[cello-devel] Cello: defmd geometry-node ...

Frank Goenninger frgo at me.com
Wed May 20 05:31:15 UTC 2009

Am 20.05.2009 um 06:23 schrieb Kenneth Tilton:

> Understood. Those diagrams obviously took a lot of work, I felt bad  
> raining on the parade. But here I go again:

Please keep going! Thanks for insisting here on the points below ...

> I learned the hard way not to do seemingly plausible default rules.  
> Now some of the ones I see above are tautological and might be OK  
> (except for the runtime cost),

Which was exactly the one thing I also got worried about. So:

> but I also see things like all three of lL, lR, and lWidth. I have  
> done that as well and regretted it.

Aha! Now I see the reasoning behind the current code base.

> With the default rules I found they would do the wrong thing and I  
> would forget they were there and it would take me forever to figure  
> out exactly where my geometry was going wrong. If instead I  
> defaulted to nil I would quickly crash and burn if I neglected to  
> specify a value (tho even there I ended up adding some debugging  
> code to figure out exactly which of the six geo params was causing  
> the "can't do arithmetic with nil" error. What I also saw was that  
> it was not all that hard to specify all six, esp. since I rarely  
> specify px/py (it's all stacks and rows for me, and those take care  
> of px/py).

Ah - also something I did different in the past: I always worked from  

> Other widgets get their bounds from their class definitions (like a  
> text label automatically sized to font and string content).
> As for having lr, ll, and lwidth, the redundancy got in the way  
> sometimes and if I wanted to specify a width I just said:
>   :lR (c? (+ (^lL) <the width I want>))
> Final thought: all those rules will be running all the time, needed  
> or not.
> Of course you have all that code there so go for it, maybe just  
> watch out for these issues and cut your losses if you start to run  
> into them yourself.

Oh - I was precisely looking for this kind of feedback - I am not too  
eager to make that experience again. I had to remind myself that I  
started this "let's do it again" just because I did not see why there  
are no default rules, why there is e.g. no width and height parameter  
for a control, why things like l-box are not always updated. Now I  
know ;-)

Lot's of effort, I know, but now I am *a lot* more clear about what  
and when and why. Thanks so much! And now going back to coding and  
just strip down the code to the same conceptual logic as Cello had it  
from the beginning.

One design goal of course is to have minimal impact on existing Cello- 
based apps.


   Frank Goenninger

   Cell: 	+49 175 4321058
   E-Mail: 	frgo at me.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2227 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cello-devel/attachments/20090520/a81dd648/attachment.bin>

More information about the cello-devel mailing list