A couple of very basic Rev object questions

Doug Lerner doug at webcrossing.com
Sat Jan 17 21:49:00 EST 2004


On 1/18/04 11:43 AM, "J. Landman Gay" <jacque at hyperactivesw.com> wrote:

> 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.

Of course the card script will be in the hierarchy if the message was sent
to a control in that card though, right?


> 
>> 
>> 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"

OK. Thanks. That helps with some of these long references!

doug



More information about the use-livecode mailing list