A couple of very basic Rev object questions

J. Landman Gay jacque at hyperactivesw.com
Sat Jan 17 21:43:36 EST 2004


On 1/17/04 7:28 PM, Doug Lerner wrote:

> I am finding myself creating multiple substacks of the main stack in my
> application - one for each kind of window.
> 
> But each window only has one card.
> 
> Question 1 - I have been putting some handlers in the stack script and some
> in the card script. But when there is just one card, it doesn't really
> matter which you put them in, right?

Right, with one major exception. The stack scripts of the substacks will 
be in the message hierarchy when the stack is frontmost. The card 
scripts will not. Sometimes this makes a big difference.

> 
> Question 2 - Since each substack only has one card, I have been naming the
> card "mainCard" and doing control references like:
> 
> button "thisButton" of card "mainCard" of stack "thisStack"
> 
> Is there a shorter way of making these references since there is only once
> card in the stack?

If you omit the card reference, the engine assumes you mean the current 
card. So you can say: button "thisButton" of stack "thisStack"

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list