use-revolution Digest, Vol 17, Issue 64

Karen Karen at curlypaws.com
Mon Feb 21 18:58:14 EST 2005


On 21/2/05 10:07 pm, Malte wrote:

> 
> Hi Karen,
> 
> have you declared the global variables in both stacks?
> 
> Like:
> 
> global gFontName,gFontSize
> 
> on mouseUp
> ...
> 
> 
> Could you please post the complete script?
> 
> Cheers,
> 
> Malte
> 
>> Is there some way in Revolution to set up a global variable such that
> both
>> the "Text Change" main stack and the "Select Font" substack can both
> access
>> it?  That would allow me to set the variable in the substack and then
>> retrieve it in the main stack.

Malte, thanks very much for replying.

I have managed to get things working thanks to Robert Brenstein, who pointed
me in the direction of coding the script in the substack as:

set the textFont of field "edtText" of card id 1002 of stack "Text Change
Dialog" to tFontName

This works and sets the textFont back in the main stack - and without
resorting to global variables.  I had tried something along these lines
originally, but had obviously got the syntax wrong.

Thanks again for your help,

Karen




More information about the use-livecode mailing list