Whoops: Getting the name of the script only stack an handler is in

William Prothero waprothero at gmail.com
Mon Dec 31 17:48:16 EST 2018


Folks:
Sorry, I accidentally sent the email before finishing it. Here’s the complete message.
But perhaps I’ve solved it. I only need to put the name of the “feature” stack in the pollActions handler. Anyway, I still have my question.

I’m trying to implement a structure where I can simply add script only stacks that seamlessly add capability to my app. To do this, I have all of the “feature” stacks in a given folder, and when I initialize the app, I start using all of the “feature” stacks. Then I want to initialize all of them, so I send a message that gets passed in each “feature” stack.

I do, in each “feature” stack (which doesn’t give me the answer I want):

on pollActions
	put the short name of the current stack into myAction  (I want the name of the stack that contains this script)
	dispatch "actionsList" to cd "Opening" of stack "CP_Main" with myAction
	pass pollActions
end pollActions


In the main stack, I have:

local actionsList

on actionsList tList
	put tList&cr after actionsList
end actionsList



My question:
How do I get the name of the script only stack that holds the “Feature” code? The above code gives me the name of the main stack, which is not useful for my purposes.

Best,
Bill




More information about the use-livecode mailing list