On 6/2/21 4:42 AM, Alex Tweedly via use-livecode wrote:

I can tell you mine - they work for me , but whether they work for you, or anyone else, is a different matter.

Thanks for the pointers.


1. NEVER lock message just to handle resizing.
       If you need to do that, you're already in a heap of trouble :-)

Been there. Got the t-shirt.


2. ALWAYS (and I mean always) set the lockLoc of a group.
    Don't let those uppity groups change their size - you need to be in charge :-)

Ok - that's one I should take more to heart.


3. Work top-down in a (fairly) strict hierarchy. Let each level of card/group handle the layout of its component pieces, allocate space for them and "set the rect .." for each.

3a. Always resize/reposition things by setting their rect (not their top/left/width/...).       Every time I try to use those seemingly-convenient shorter forms, I get in trouble :-)

Yes, but... there are some cases where I need to set the height/width explicitly. For instance, I've got a complex group that contains a circle inside a rectangle. I could, I suppose, calculate the new height of the circle but not set it, then calculate the rectangle and center point of the circle and set the rectangle coordinates from that

Instead, I just set the height and width of the circle within the group, and this mostly seems to work if I'm careful.

--
 Mark Wieder
 [email protected]

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to