[Ktechlab-devel] New guy <--

Julian Bäume julian at svg4all.de
Tue Nov 11 22:43:05 UTC 2008


On Wednesday 12 November 2008 00:06:29 P Zoltan wrote:
> On Fri, 07 Nov 2008 01:59:32 +0100, Alan Grimes <agrimes at speakeasy.net>
>
> wrote:
> > here's the biggest bug I'm seeing on my machine...
> > I have this simulation of my father's Harman Kardon 430 (from 1974)...
> > The amp works (even though it doesn't seem to for the first few
> > minutes... the real amp takes about 30 seconds for the input
> > differential amp to un-clamp... =\
> > the problem is when I go to save it and load it, the entire circuit is
> > messed up. 2/3rds of the connectors are gone, there are a lot of
> > dangling junctions.... Undo/redo creates a similar effect. The problem
> > must be in the document heirarchy, It's all based on QT's DOM/XML engine.
>
>   I'm having the same problem. Something is messed-up with se save-load
> (and the undo-redo?) classes. I didn't want to touch those in refactoring,
> because there are chanses of breaking the file structure -- that would be
> really annoying.
>   Anyway, the save-load should be changed, because:
> - it's not extensible; there is no file-format versioning support.
> - it's hard to mantain: the load-save mechanism contains some "data"
> classes, which must be in sync with the internal data strctures.
> (- the generated XML sucks, imho :P)
>   My opinion is that the code responsible for loading and saving existing
> file format should be separated in some classes; the objects (connectors,
> nodes, ...) should be able to load and save their states in some text; the
> versioning can be done by creating converters between the actual format
> and the (possibly older) other version; the conversion between document
> format should not be done in the components.
>   The loading of a circuit could be something like this:
> - enumerat the existing known file format versions
> - open the file, get the version info
> - choose the appropriate parser for that version
> - that parser knows the file structure; for each contained object, calls
> the corresponding object's interface/constructor, for instance:
>    var = new SomeComponent(XML_description_string);
>   Opinions?
Yes, I looked into this part of the code lately and also think it needs some 
work... ;) I will create something in the wiki for that tomorrow morning. I'm 
to tired tonight.... 

I also thought about writing test-cases with QTest framework. So we can be 
sure everything runs as we expect it to. My plan is to create unit-tests for 
all kind of data we store. I don't know how easy it would be to create 
reasonable tests for the simulator part. Could you provide a test-file that 
doesn't work at the moment?

bye
julian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20081111/8907880b/attachment.sig>


More information about the Ktechlab-devel mailing list