On Wed, 20 Apr 2005 16:33:47 +0100, David Burgun <[EMAIL PROTECTED]> wrote:
Hi,

I am confused, in the case where "StackA" calls a Function in
"GlobalStack", when in that function should "this stack" return
"StackA" or "GlobalStack" ?

I want it to return "StackA" so that the functions are general.


I think it works the way you want: if you put a function in your mainstack "GlobalStack" whose script is


function ReportMyName
  return the short name of this stack
end ReportMyName

and then you call it from your substack "StackA" (the script of "GlobalStack" will automatically be in the message path) say in a button which is scripted

on mouseUp
  put reportMyName()
end mouseUp

You'll get "StackA" in the message box, but if you run that script from "GlobalStack", you'll get "GlobableStack", or from another substack "StackB", then that name. So within the function, 'this' still refers to the calling stack. I think this is what you expected.

HTH

Graham
------------------------------------------------------------------------ ---
Graham Samuel / The Living Fossil Co. / UK and France


_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to