Plug-in stack script not surviving sessions
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Plug-in stack script not surviving sessions
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
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
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Plug-in stack script not surviving sessions
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
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
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
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
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Plug-in stack script not surviving sessions
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
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
Hm, very strange...
Re: Plug-in stack script not surviving sessions
Do you end it with a pass? If you intercept the saveStackRequest then you abort the save I believe.
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Plug-in stack script not surviving sessions
Yes I do, but a good point.Do you end it with a pass? If you intercept the saveStackRequest then you abort the save I believe.
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.
-
- VIP Livecode Opensource Backer
- Posts: 9669
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Plug-in stack script not surviving sessions
No comments for a while.
I will sent the stack to the team and see what they make of it.
Craig
I will sent the stack to the team and see what they make of it.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Plug-in stack script not surviving sessions
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?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Plug-in stack script not surviving sessions
http://forums.livecode.com/viewtopic.ph ... 04#p172790FourthWorld wrote: ↑Fri Nov 02, 2018 7:11 pmThis 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?
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Plug-in stack script not surviving sessions
Is this reproducible with another stack file?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Plug-in stack script not surviving sessions
I think we need to see more of the handler in question.
What about the following:
What about the following:
Code: Select all
on saveStackRequest
pass saveStackRequest
end saveStackRequest
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker