Geometry in latest version of RunRev

Dave dave at looktowindward.com
Wed Oct 31 20:40:52 EDT 2007


On 1 Nov 2007, at 00:07, Richard Gaskin wrote:

> Dave wrote:
>
>> On 31 Oct 2007, at 23:37, Richard Gaskin wrote:
>>> What sort of layout were you working on that riggered this "panic"?
>> I very simple resize of some fields and move the button at the   
>> bottom. Had everything ready for a demo and then they said, could  
>> you  just.........
>> All I wanted was to quickly have something that just worked, but  
>> I  couldn't risk all the object flying off into outer space, so in  
>> the  end bodged up something for the demo.
>> I'd like something that was half way standard that I could use in  
>> all  my scripts.
>
> What do you mean by "standard"?

Well there are a number of standard things you might want to do, such  
as move the bottom, right to grow or shrink the object, move the  
object, etc. It would be nice to be able to just set a Custom Prop or  
whatever that said what you wanted to happen and some "standard"  
driving code pick this up and do the necessary.
>
> I just handle the resizeStack message myself.  As a simple example,  
> this handler will cover a simple stack with a field and two buttons  
> at the bottom:
>

I hate using hard object names in scripts and in fact I never do  
except in a demo or test app. It would be good to optionally have a  
handler in the object that gets run if it's defined or if not in the  
group, card or stack that could read the Custom Props of the object  
and perform the operation.
>
> on resizeStack x,y
>    set the rect of fld "Main" to 20,8,x-20,y-48
>    set the bottomRight of btn "OK" to x-20,y-20
>    set the bottomRight of btn "Cancel" to \
>      (the left of btn "OK"-12),y-20
> end resizeStack

I may well attempt to do some sort of "standard" implementation, but  
not at the moment, way too much other stuff to do.

All the Best
Dave




More information about the use-livecode mailing list