Re: Improving lifeline objects behaviour



On Sun, 2007-09-02 at 11:02 +0200, Filippo Bergamasco wrote:
Lars,
I'm glad to see that you have tested my patch and appreciated my idea!
Maybe i didn't point out that that was a quick hack used mostly as an
experiment to improve lifeline usability instead of a definitive
change to the code. My first aim was to change its behaviour by
modifying as less as possible to avoid side-effects or accidentally
destroy compatibility with old versions. 

So.. by your leave.. now i would like to _partially_ re-write lifeline
code making this big but (imho) necessary changes:

1) Change overall behaviour as shown in my previous patch, but with
the care to let cp_distance be a property of lifeline object (magic is
bad.. sir, yes sir!  <-- i also agree to this) 

2) Solve the boring problem to have 2 cp_lines by side plus 6 fixed cp
just to quickly mantain backward compatibility

Please!  It's awful!

3) Create a _very_ simple gui to let users adjust cp_distance by a
specific value instead of hardcoded increments (<-- this one needs
your ok ) 

I do believe this will come automatically as part of 1).  Make the
property a PROP_TYPE_LENGTH and you even get units.  Just remember to
set PROP_FLAG_OPTIONAL to allow loading of old objects without this
value.

4) Mantain compatibility with older versions by _converting_ old
objects to new ones while loading. This is actually the main problem
for me because i didn't figure out well how objects are saved/loaded..
can you give me a quick advice about where to look for some
informations?  Is also necessary to convert new objects to old ones
while saving? 

Don't worry about converting to old style, forwards compatibility is not
as important in pre-1.0 as improvements.

Most of what there is of coding documentation outside the source is at
<URL:http://faemalia.org/wiki/view/Technical/DiaEditor>.  You can use
the version parameter to check whether you need to convert from old
style.


Unfortunately now I'm so busy with exams so I'm asking you to give me
some time to do and test all these, but it will ends up to a nice
work.. i promise :)

Sounds good.  I know all about being busy:)  I'll apply the patch you
sent, since it doesn't break any compatibility anyway, and then you can
work off of SVN.

ps. 
What about document what I've found? What exactly I'll have to do?
Just comment my code or...?

Comment the code, yes please.  JavaDoc style is preferred.

-Lars




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]