Hi guys,<br>David told me that the message box is kind of annoying since it doesn't do anything yet. So, I've defined a macro that only enables the messages box when it's defined. This way I can work and don't annoy anyone.<br>

<br>In the patch you'll also see a new function implemented: loadFromString. It isn't used anywhere so feel free to erase it (it will be used to load an updated network with clamrefactor residing in memory)<br><br>

Bye!<br><br><div class="gmail_quote">On Sun, Jul 18, 2010 at 4:29 PM, Xavier Serra Román <span dir="ltr"><<a href="mailto:xvr.serra@gmail.com">xvr.serra@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Works great. Thanks David!<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Jul 18, 2010 at 3:22 PM, David García Garzón <span dir="ltr"><<a href="mailto:david.garcia@upf.edu" target="_blank">david.garcia@upf.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
A more standard version.<br>
<br>
A Diumenge 18 Juliol 2010 15:17:55, David García Garzón va escriure:<br>
<div><div></div><div>> Try with the attached Makefile which uses python-config to retrieve the<br>
> compilation flags. It works quite well in ubuntu lucid.<br>
><br>
> David.<br>
><br>
> A Divendres 16 Juliol 2010 16:22:57, Xavier Serra Román va escriure:<br>
> > Hey guys, as you know I'm trying to call clamrefactor.py from<br>
> > NetworkEditor but I've run into a problem. When I call the constructor<br>
> > of the class in the module from C I get:<br>
> > "No module named expat; use SimpleXMLTreeBuilder instead"<br>
> ><br>
> > When I try to use the module directly with a Python script the<br>
> > constructor works just fine, so I don't think it's an installation issue<br>
> > as google suggests<br>
> ><br>
> > I'll send you the code so you can reproduce the error. I'm running Ubuntu<br>
> > 10.04.<br>
> > To compile the code just type 'make' and to run it " PYTHONPATH=`pwd`<br>
> > ./main " otherwise the program won't find the module.<br>
> ><br>
> > Thanks!<br>
> ><br>
> > On Thu, Jul 1, 2010 at 6:01 PM, David García Garzón <<br>
> ><br>
> > <a href="mailto:david.garcia@barcelonamedia.org" target="_blank">david.garcia@barcelonamedia.org</a>> wrote:<br>
> > > On Thursday 01 July 2010 00:17:56 Xavier Serra wrote:<br>
> > > > On Jun 30, 2010, at 11:18 PM, Natanael Olaiz wrote:<br>
> > > ><br>
> > > > Hi,<br>
> > > ><br>
> > > > El 06/30/2010 09:13 PM, Xavier Serra escribió:<br>
> > > ><br>
> > > > On Jun 30, 2010, at 5:01 PM, David García Garzón wrote:<br>
> > > ><br>
> > > ><br>
> > > > On Monday 21 June 2010 17:14:57 Xavier Serra wrote:<br>
> > > ><br>
> > > ><br>
> > > > Hi guys,<br>
> > > > I'm Xavi Serra, an student at UPF doing his final project for CLAM<br>
> > > > with David.<br>
> > > ><br>
> > > > We intend to extend the funcionality of the NetworkEditor. The first<br>
> > > > thing we are doing is to detect when a network file is outdated and<br>
> > > > automatically throw clamRefactor (asking permission to the user to do<br>
> > > > so).<br>
> > > ><br>
> > > > [snip]<br>
> > > ><br>
> > > > Xavier Serra<br>
> > > ><br>
> > > ><br>
> > > > Committed after some refactorings we did yesterday together. Now a<br>
> > > > dialog is shown on version mismatch and in the case of a network of<br>
> > > > an older version it gives you the option to upgrade the network by<br>
> > > > using clamrefactor before loading it. The upgrade is still dummy,<br>
> > > > but Xavi is already working on it.<br>
> > > ><br>
> > > > Xavi, some screenshots would be helpful so that other developers can<br>
> > > > do comments on usability aspects. Could you put them on the wiki?<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > Done.<br>
> > > ><br>
> > > > It would be great too if you guys could give some feedback about<br>
> > ><br>
> > > usability<br>
> > ><br>
> > > > issues. I think the messages are now, after David's modification,<br>
> > > > more clear but I'd prefer more opinions.<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > The messages are clear to me.<br>
> > > ><br>
> > > > But I have some questions:<br>
> > > ><br>
> > > > 1- The clamVersion attribute did always existed on the clam network<br>
> > ><br>
> > > files?<br>
> > ><br>
> > > > (I cannot found it in the CHANGES log) If not, there are probably no<br>
> > > > clam networks so much outdated being used... but what would happens<br>
> > > > if it doesn't exist? From<br>
> > > > <a href="http://doc.trolltech.com/4.5/qxmlquery.html#evaluateTo-4" target="_blank">http://doc.trolltech.com/4.5/qxmlquery.html#evaluateTo-4</a> : "If output<br>
> > > > is null behavior is undefined."<br>
> > > ><br>
> > > ><br>
> > > > It didn't. Files without the attribute are treated as older file and<br>
> > ><br>
> > > thus,<br>
> > ><br>
> > > > need conversion. David told me these files are pre-1.2 or so.<br>
> > ><br>
> > > Indeed first versioned version was 1.3.1 (unreleased) so unversioned<br>
> > > versions<br>
> > > should be considered 1.3.0 or earlier.<br>
> > ><br>
> > > > 2- What would be the behavior in case of different versions? I think<br>
> > > > that checking the version number is OK as a first test of possible<br>
> > > > conflict between releases, but the needed changes and the definitely<br>
> > > > tests should be done looking in a migrationScript file or something<br>
> > > > like that. How we would deal with the different migrationScripts that<br>
> > > > we have in the core and different plugins? We would include all of<br>
> > > > them in the NetworkEditor to make such a test?<br>
> > > ><br>
> > > ><br>
> > > > When NetworkEditor detects that a file is older it will throw<br>
> > ><br>
> > > clamRefactor.<br>
> > ><br>
> > > > The idea is to have a migrationScript file with the steps needed to<br>
> > > > go from version to version and use that when calling clamRefactor<br>
> > > ><br>
> > > > 3- David: do you think that it would be difficult to put the<br>
> > > > interface to check the network version on the CLAM::XMLStorage<br>
> > > > class? I know that this improvement  and interface to  solve the<br>
> > > > version conflict is inherent to the NetworkEditor, but<br>
> > > > CLAM::XMLStorage would not be the ideal place to just check the<br>
> > > > version? Maybe returning diferent error codes on the Restore...<br>
> > ><br>
> > > First approach was using XMLStorage to extract just the version in a<br>
> > > double parsing like now, but that led us to some hard to solve<br>
> > > problems. It's true that doing such a thing in the actual network<br>
> > > loading would be more elegant it<br>
> > > would need more insight from Xavi on the loading process. So i would<br>
> > > left that<br>
> > > for a future refactoring. Sorry for adding a new dependency but still<br>
> > > is Qt.<br>
> > ><br>
> > > Besides that, current cases are:<br>
> > > - Same, load as is<br>
> > > - Older, warn, update and load (default)<br>
> > > - Older, warn, load as is<br>
> > > - Older, warn, cancel<br>
> > > - Newer, warn, user cancels (default)<br>
> > > - Newer, warn, user load it as is<br>
> > ><br>
> > > I am wondering whether, it is more usable that, in the case of older<br>
> > > versions<br>
> > > updating without asking. Something like:<br>
> > > - Same, load as is<br>
> > > - Older, update and load<br>
> > > - Newer, warn, user cancels (default)<br>
> > > - Newer, warn, user load it as is<br>
> > ><br>
> > > Any way, while the update is not finished, i would keep update as an<br>
> > > option.<br>
<br>
--<br>
David García Garzón<br>
(Work) david dot garcia at upf anotherdot edu<br>
<a href="http://www.iua.upf.edu/%7Edgarcia" target="_blank">http://www.iua.upf.edu/~dgarcia</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>