Page 1 of 1
Plug-in stack script not surviving sessions
Posted: Wed Oct 31, 2018 3:04 pm
by dunbarx
I have a plug-in that has two handlers in the stack script.
But now I cannot save any additional handlers to the stack script between sessions. The original pair of handlers, that I made when I first built the plug-in, always survives.
Nothing obvious, like the "cantModify" or anything like that. How does the stack script know to keep the handlers made long ago, but not any new ones? Is it just me?
Craig Newman
Re: Plug-in stack script not surviving sessions
Posted: Wed Oct 31, 2018 3:19 pm
by dunbarx
Well.
It seems that only trying to add a "saveStackRequest" handler to the plug-in stack script fails to save between sessions. That was the message I was trying to catch. Others seem to have no issue staying in the script.
But the entire "saveStackRequest" handler disappears between sessions.
Craig
Re: Plug-in stack script not surviving sessions
Posted: Wed Oct 31, 2018 6:59 pm
by Klaus
Hi Craig,
1. How do you save that stack? Via menu (CMD-S) or via script?
2. If the latter, what does "the result" show you after you issue your "save" command?
3. Does this also happen, if you quit LC, take the stack out of the plugin folder and edit it as a "regular" stack? That's what I would try first.
Best
Klaus
Re: Plug-in stack script not surviving sessions
Posted: Wed Oct 31, 2018 9:46 pm
by dunbarx
Klaus.
Hi.
I save by CMD-S.
So I added a button and saved via a short handler. The result is empty.
I took the plug-in out of the plugin folder, added a saveStackRequest handler, saved everything and quit LC.
When I reopened, the new handler was not there. I can add other handlers, and they stick just fine. It seems it is just "saveStackRequest".
Craig
Re: Plug-in stack script not surviving sessions
Posted: Wed Oct 31, 2018 10:02 pm
by Klaus
Hm, very strange...
Re: Plug-in stack script not surviving sessions
Posted: Wed Oct 31, 2018 10:57 pm
by bwmilby
Do you end it with a pass? If you intercept the saveStackRequest then you abort the save I believe.
Re: Plug-in stack script not surviving sessions
Posted: Wed Oct 31, 2018 11:51 pm
by dunbarx
Do you end it with a pass? If you intercept the saveStackRequest then you abort the save I believe.
Yes I do, but a good point.
But my issue is not that I cannot save a stack, even the plugin stack. It is that the "saveStackRequest" handler itself will not survive sessions in my plugin stack script. No problem with a "rawKeyUp" handler, which does most of what that plugin is for. I have added several other handlers, just to test. They all stick.
It is a problem with that specific handler, "saveStackRequest". It just does not stick in a new session.
I do not know if there is something about that particular plugin, but I cannot imagine why, since other handlers have no problems at all.
Craig
EDIT. Restarting the machine does not help.
Re: Plug-in stack script not surviving sessions
Posted: Fri Nov 02, 2018 7:07 pm
by dunbarx
No comments for a while.
I will sent the stack to the team and see what they make of it.
Craig
Re: Plug-in stack script not surviving sessions
Posted: Fri Nov 02, 2018 7:11 pm
by FourthWorld
This shouldn't matter, but we're dealing with unknowns so better to be thorough: are you able to add that handler to the stack script if it is opened from a location other than the Plugins folder?
Re: Plug-in stack script not surviving sessions
Posted: Fri Nov 02, 2018 7:18 pm
by Klaus
FourthWorld wrote: ↑Fri Nov 02, 2018 7:11 pm
This shouldn't matter, but we're dealing with unknowns so better to be thorough: are you able to add that handler to the stack script if it is opened from a location other than the Plugins folder?
http://forums.livecode.com/viewtopic.ph ... 04#p172790
Re: Plug-in stack script not surviving sessions
Posted: Fri Nov 02, 2018 8:16 pm
by FourthWorld
Is this reproducible with another stack file?
Re: Plug-in stack script not surviving sessions
Posted: Fri Nov 02, 2018 8:25 pm
by bwmilby
I think we need to see more of the handler in question.
What about the following:
Code: Select all
on saveStackRequest
pass saveStackRequest
end saveStackRequest