"Close and Remove from Memory" does not call CloseStack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 854
- Joined: Wed Nov 04, 2009 11:41 am
- Location: Gunthorpe, North Lincs, UK
"Close and Remove from Memory" does not call CloseStack
Well the title says it all.
If the stack is just closed from the menu then "closestack message" is sent but if the "Close and Remove from Memory" is used it is not.
I'm on a Mac by the way.
Why is this?
If the stack is just closed from the menu then "closestack message" is sent but if the "Close and Remove from Memory" is used it is not.
I'm on a Mac by the way.
Why is this?
best wishes
Skids
Skids
-
- VIP Livecode Opensource Backer
- Posts: 9732
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: "Close and Remove from Memory" does not call CloseStack
If I have both a closeStack and a closeStackRequest handler in the stack script:
Only "closeStack" fires from the "close" menuitem.
Both fire if I close from the close box.
Neither fires from the "close and remove from memory" menuItem
Craig
Code: Select all
on closeStack
answer random(999)
end closeStack
on closeStackRequest
answer any char of "ASDFG"
pass closeStackRequest
end closeStackRequest
Both fire if I close from the close box.
Neither fires from the "close and remove from memory" menuItem
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9732
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: "Close and Remove from Memory" does not call CloseStack
I cannot understand why neither message is sent with the ""close and remove from memory" selection. In fact, nothing appears in the message watcher with that menuItem. LC obviously closes down really fast and really early when this is the selected way out.
Craig
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9852
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: "Close and Remove from Memory" does not call CloseStack
So you get the messages when you close the stack from your own menu after selecting "Suspend IDE"?dunbarx wrote: ↑Mon Apr 01, 2024 3:25 pmIf I have both a closeStack and a closeStackRequest handler in the stack script:Only "closeStack" fires from the "close" menuitem.Code: Select all
on closeStack answer random(999) end closeStack on closeStackRequest answer any char of "ASDFG" pass closeStackRequest end closeStackRequest
Both fire if I close from the close box.
Neither fires from the "close and remove from memory" menuItem
Craig
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
-
- VIP Livecode Opensource Backer
- Posts: 9732
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: "Close and Remove from Memory" does not call CloseStack
Richard.
Nobody ever mentioned suspending the IDE. Simon just wondered why using the "close and remove from memory" menuItem no messages are sent.
Craig
Nobody ever mentioned suspending the IDE. Simon just wondered why using the "close and remove from memory" menuItem no messages are sent.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9732
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: "Close and Remove from Memory" does not call CloseStack
Richard.
Did you mean "suspend development tools"? I never heard of suspending the IDE.
Craig
Did you mean "suspend development tools"? I never heard of suspending the IDE.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9852
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: "Close and Remove from Memory" does not call CloseStack
Yes, suspending. How does that affect what you're experiencing?
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
-
- Posts: 854
- Joined: Wed Nov 04, 2009 11:41 am
- Location: Gunthorpe, North Lincs, UK
Re: "Close and Remove from Memory" does not call CloseStack
Good morning, I have just checked and "suspend development tools" removes all options to close the application under development. Quitting Livecode even fails so its a dead end and I have no idea why it is an option; probably a good idea at the time.
S
S
best wishes
Skids
Skids
-
- VIP Livecode Opensource Backer
- Posts: 9852
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: "Close and Remove from Memory" does not call CloseStack
The goal with suspending the IDE is to provide an environment that more closely matches runtime. This can be useful to testing some things, esp menus or things that really on messages the IDE traps, like the pointer tool.Simon Knight wrote: ↑Tue Apr 02, 2024 9:52 amGood morning, I have just checked and "suspend development tools" removes all options to close the application under development. Quitting Livecode even fails so its a dead end and I have no idea why it is an option; probably a good idea at the time.
When you'd quit during suspension, what code did your interface use to do so?
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: "Close and Remove from Memory" does not call CloseStack
It is needed but as far as I know, rarely. Things like pasteKey need this for testing (basically approximating a standalone runtime).Simon Knight wrote: ↑Tue Apr 02, 2024 9:52 amGood morning, I have just checked and "suspend development tools" removes all options to close the application under development. Quitting Livecode even fails so its a dead end and I have no idea why it is an option; probably a good idea at the time.
S
The LiveCode development environment traps the pasteKey message, unless "Suspend LiveCode UI" is turned on in the Development menu. This means that the pasteKey message is not received by a stack if it's running in the development environment.
-
- Posts: 854
- Joined: Wed Nov 04, 2009 11:41 am
- Location: Gunthorpe, North Lincs, UK
Re: "Close and Remove from Memory" does not call CloseStack
When you'd quit during suspension, what code did your interface use to do so?
Code: Select all
On CloseStack
WriteAppPrefsData
end CloseStack
S
best wishes
Skids
Skids