Instead of doing this

on openCard
global debugMode
global inChatUsers, newChatSocket
global chatRect, chatRectHalf, wbRect
put "8,8,596,314" into chatRect
....

do this

global debugMode
global inChatUsers, newChatSocket
global chatRect, chatRectHalf, wbRect
on openCard
put "8,8,596,314" into chatRect
...

Then you can access the globals from all the handlers (opencard/closecard) etc...

Cheers.

From: Doug Lerner <[EMAIL PROTECTED]>
Reply-To: How to use Revolution <[EMAIL PROTECTED]>
To: How to use Revolution <[EMAIL PROTECTED]>
Subject: Re: Weirdness with global variable declaration
Date: Mon, 19 Jan 2004 15:37:22 +0900

What do you mean by "off by themselves"?

doug

On 1/19/04 2:47 PM, "Thomas J McGrath III" <[EMAIL PROTECTED]> wrote:

> just declare the globals off by themselves...
>
> then do your on opencard.
>
>
> On Jan 18, 2004, at 11:40 PM, Doug Lerner wrote:
>
>> I read about doing that - in a so-called "script" rather than in a
>> "handler". But I wasn't clear about how that works.
>>
>> How do script commands get executed if they are not part of a handler?
>>
>> doug
>>
>> On 1/19/04 1:32 PM, "Thomas J McGrath III" <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Have you tried creating the global outside of this handler?
>>> put it by itself before the openCard .
>>>
>>> On Jan 18, 2004, at 9:37 PM, Doug Lerner wrote:
>>>
>>>> In an openCard handler I have:
>>>>
>>>> on openCard
>>>>   global debugMode
>>>>   global inChatUsers, newChatSocket
>>>>   global chatRect, chatRectHalf, wbRect
>>>>   put "8,8,596,314" into chatRect
>>>>   .
>>>>   .
>>>>   .
>>>>
>>>> But a button in that card doesn't seem to know the value of chatRect.
>>>> And
>>>> while globalNames lists inChatUsers, newChatSocket and debugMode it
>>>> doesn't
>>>> list any of the three globals on the third line of the handler above.
>>>>
>>>> Any reasons why a global should no longer be among the globalNames?
>>>>
>>>> Thanks,
>>>>
>>>> doug
>>>>
>>>> _______________________________________________
>>>> use-revolution mailing list
>>>> [EMAIL PROTECTED]
>>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>>
>>>>
>>>
>>> Macintosh PowerBook G-4 OSX 10.3.1, OS 9.2.2, 1.25 GHz, 512MB RAM, Rev
>>> 2.1.2
>>>
>>>
>>> Advanced Media Group
>>> Thomas J McGrath III    € 2003 €    [EMAIL PROTECTED]
>>> 220 Drake Road, Bethel Park, PA 15102
>>>
>>>
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> [EMAIL PROTECTED]
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>> _______________________________________________
>> use-revolution mailing list
>> [EMAIL PROTECTED]
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
>
> Macintosh PowerBook G-4 OSX 10.3.1, OS 9.2.2, 1.25 GHz, 512MB RAM, Rev
> 2.1.2
>
>
> Advanced Media Group
> Thomas J McGrath III    € 2003 €    [EMAIL PROTECTED]
> 220 Drake Road, Bethel Park, PA 15102
>
>
>
> _______________________________________________
> use-revolution mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

_________________________________________________________________
Send mobile Christmas cards, download a festive ringtone and win a Motorola E365. Go to: http://ninemsn.com.au/mobilecentral/christmas.asp


_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to