Learning about GLOBALS late in life . . .

2009-11-16 Thread Richmond Mathewson
tried this: on mouseDown global LEFTT, TOPP put the top of fld acre into TOPP put the left of fld acre into LEFTT grab me end mouseDown on mouseUp put the bottom of fld acre into DOWP put the right of fld acre into RITE put RITE - LEFTT into WIDD put DOWP - TOPP into HITE end

Re: Learning about GLOBALS late in life . . .

2009-11-16 Thread Jacques Hausser
Richmond If the globals are defined in a handler, they must be defined in each handler using them... if you define them at the script level, no problem Jacques Le 16 nov. 2009 à 17:53, Richmond Mathewson a écrit : tried this: on mouseDown global LEFTT, TOPP put the top of fld acre into

Re: Learning about GLOBALS late in life . . .

2009-11-16 Thread Colin Holgate
On Nov 16, 2009, at 11:53 AM, Richmond Mathewson wrote: and the third line within the 'on mouseUp' threw a bluey Either put the global thing in each handler, or just once at the top. So this would work for example: global t on mousedown put random(100) into t end mousedown on mouseup

Re: Learning about GLOBALS late in life . . .

2009-11-16 Thread Mark Wieder
Richmond- Monday, November 16, 2009, 9:00:46 AM, Colin wrote: top. So this would work for example: global t ...but do you really want to do that? This would also work... local LEFTT, TOPP on mouseDown put the top of fld acre into TOPP put the left of fld acre into LEFTT grab me

Re: Learning about GLOBALS late in life . . .

2009-11-16 Thread Colin Holgate
On Nov 16, 2009, at 12:22 PM, Mark Wieder wrote: global t ...but do you really want to do that? Yes, definitely, if it's part of an answer to a question about making globals work. Now, Richmond may well want to learn about locals too, but I was just answering the question he asked!

Re: Learning about GLOBALS late in life . . .

2009-11-16 Thread Richmond Mathewson
Mark Wieder wrote: Richmond- Monday, November 16, 2009, 9:00:46 AM, Colin wrote: top. So this would work for example: global t ...but do you really want to do that? This would also work... local LEFTT, TOPP Thanks for that one; especially going local. What a great

Re: Learning about GLOBALS late in life . . .

2009-11-16 Thread Mark Wieder
Colin- Monday, November 16, 2009, 9:29:30 AM, you wrote: Yes, definitely, if it's part of an answer to a question about making globals work. Now, Richmond may well want to learn about locals too, but I was just answering the question he asked! g -- -Mark Wieder mwie...@ahsoftware.net

Re: Learning about GLOBALS late in life . . .

2009-11-16 Thread Richmond Mathewson
Colin Holgate wrote: On Nov 16, 2009, at 12:22 PM, Mark Wieder wrote: global t ...but do you really want to do that? Yes, definitely, if it's part of an answer to a question about making globals work. Now, Richmond may well want to learn about locals too, but I was just

Re: Learning about GLOBALS late in life . . .

2009-11-16 Thread Colin Holgate
On Nov 16, 2009, at 1:41 PM, Richmond Mathewson wrote: but Mark's was pedagogically more useful as I had 'forgotten' about locals I always strive to be pedagogically less useful. Interestingly, I knew the answer not from knowing Rev, and certainly not HyperCard (which doesn't work that