Can't set a card to the screenrect (sort of)
J. Landman Gay
jacque at hyperactivesw.com
Fri Jun 18 00:23:59 EDT 2004
On 6/17/04 12:21 PM, Raymond E. Griffith wrote:
> ----- Original Message -----
> From: "Howard Bornstein" <bornstein at designeq.com>
> To: "How to use Revolution" <use-revolution at lists.runrev.com>
> Sent: Wednesday, June 16, 2004 4:26 PM
> Subject: Can't set a card to the screenrect (sort of)
>
>
>
>>These are the kind of problems that just drive me batty.
>>
>>I create a stack via code. Then I set it to the rect of the screenrect.
>>
>>I do a bunch of stuff, including adding items to the stack. Then I
>>group the items.
>>
>>Finally, I set the rect of the group to the rect of the card (which
>>should be the screenrect).
>>
>>This works fine if I put in a breakpoint. I run the code, hit the
>>breakpoint, click Run in the debugger, and Bob's your uncle. I end up
>>with a scrollable group the size of the screen.
>>
>>However, if I just run the code without any breakpoint, Rev thinks the
>>card size is 256 X 256 (the default size when creating a card) and the
>>group is set to this size--even after I've set the rect of the stack to
>>the screenrect.
>>
>>The commands I use are:
>>
>><create a stack>
>>set the rect of stack MapName to the screenRect
>><create objects and group them>
>>set the rect of group "Grid" of card "Map" of stack MapName to the rect
>>of card "Map" of stack MapName
>
>
> There is no "rect" of a card, simply the rect of the stack.
True, they are the the same, proportionally. The language does support
getting the rect of a card though; it's a handy way to get stack sizes
in local coordinates. The rect of the stack returns in global coordinates.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list