Re: How to detect that user closed window
Okay that clears it up. I will need that info in a bit. I will need to use the filename of the mainStack in substack scripts. Bob S On Feb 6, 2015, at 17:40 , Richard Gaskin ambassa...@fourthworld.commailto:ambassa...@fourthworld.com wrote: Bob Sneidar wrote: filename does not seem to be a property of a stack. The filename is a property of mainstacks. For substacks use the effective filename. For stacks that have been newly created, or downloaded over the Web, the filename will be empty. -- Richard Gaskin ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
Ah, thx richard, but didn't know it was only the main, but it makes sense. So, if you want to save a substack as a separate stack file, you'd have to a) set its mainstack property to itself, and b) set the path and filename you wish to save it to before you save it, otherwise the save as dialog will always pop up. If you just want to save the mainstack (which wouldn't work in a standalone anyway unless using the splashstack method) You'd want to make sure you were actually saving the mainstack, which would of course save its substacks. And as richard said, any newly created or downloaded mainstacks won't have the filename set, so you'd have to do that in code before calling save if you don't want it to pop up the dialog. On Fri, Feb 6, 2015 at 6:40 PM, Richard Gaskin ambassa...@fourthworld.com wrote: Bob Sneidar wrote: filename does not seem to be a property of a stack. The filename is a property of mainstacks. For substacks use the effective filename. For stacks that have been newly created, or downloaded over the Web, the filename will be empty. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
filename does not seem to be a property of a stack. If you mean the first two fields in the Stack Properties palette, then yes it is named. Bob S On Feb 5, 2015, at 17:00 , Mike Bonner bonnm...@gmail.commailto:bonnm...@gmail.com wrote: Silly question, but.. the filename of the stack is set, right? If its empty, when you try to save, the save as dialog will pop. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
Bob Sneidar wrote: filename does not seem to be a property of a stack. The filename is a property of mainstacks. For substacks use the effective filename. For stacks that have been newly created, or downloaded over the Web, the filename will be empty. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
It doesn’t work in the IDE. I tried it. I set a checkpoint on the first line of that very handler, and I got the save dialog before the handler was triggered, which is why I put it in the frontScript. Besides, in the frontScript, it works no matter which stack or substack I close. This is important to me not just because I want to suppress the save dialog, but I actively set properties as a poor man’s stack global variables, so making sure the stack is saved when I close it is a necessary part of my applications, and giving the user the change to discard changes can adversely affect the operation of my applications. Bob S On Feb 5, 2015, at 11:45 , FlexibleLearning.comhttp://FlexibleLearning.com ad...@flexiblelearning.commailto:ad...@flexiblelearning.com wrote: The IDE can be easily suppressed with... on closeStackRequest lock messages save this stack pass closeStackRequest end closeStackRequest Hugh Senior FLCo ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
Bob Sneidar wrote: Nope. You would think it does, but I have this in the stack script: on closeStackRequest save this stack pass closeStackRequest end closeStackRequest I still get the save dialog when I close it. The script above will work well in a standalone, but won't account for the IDE's needs. The IDE monitors stacks for actions which would flag it as dirty (needing saving), but there is no general stack property for that. Given this, saving will indeed save the stack but won't inform the IDE that the stack is now clean. Instead, you can let the IDE handle both with this, which I use in my Devo plugin: dispatch menuPick to btn File of grp revMenuBar \ of stack revMenuBar with Save -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
Had to pass closeStackRequest, but I still get the menu. I am not sure there is a way in LC to do this, and there ought to be. Perhaps I’ll include a feature request for this, something like a property called suppressSavePrompt. It can be set to values “save” or “close”. Bob S On Feb 5, 2015, at 09:17 , Bob Sneidar bobsnei...@iotecdigital.commailto:bobsnei...@iotecdigital.com wrote: Didn’t work. Bob S on closeStackRequest dispatch menuPick to btn File of grp revMenuBar \ of stack revMenuBar with Save end closeStackRequest ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
Didn’t work. Bob S on closeStackRequest dispatch menuPick to btn File of grp revMenuBar \ of stack revMenuBar with Save end closeStackRequest On Feb 5, 2015, at 09:10 , Richard Gaskin ambassa...@fourthworld.commailto:ambassa...@fourthworld.com wrote: dispatch menuPick to btn File of grp revMenuBar \ of stack revMenuBar with Save ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
Nope. You would think it does, but I have this in the stack script: on closeStackRequest save this stack pass closeStackRequest end closeStackRequest I still get the save dialog when I close it. Bob S On Feb 4, 2015, at 14:32 , J. Landman Gay jac...@hyperactivesw.com wrote: On 2/4/2015 4:22 PM, Bob Sneidar wrote: Did anyone ever find a workaround for detecting that the user clicked the Close Window control, so I can intercept it and save the stack so Livecode does not ask? I suppose I could save the damn stack overtime I do anything in any handler, but GEEZE. Doesn't closeStackRequest work? -- Jacqueline Landman Gay | jac...@hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
Silly question, but.. the filename of the stack is set, right? If its empty, when you try to save, the save as dialog will pop. On Thu, Feb 5, 2015 at 1:44 PM, Bob Sneidar bobsnei...@iotecdigital.com wrote: It doesn’t work in the IDE. I tried it. I set a checkpoint on the first line of that very handler, and I got the save dialog before the handler was triggered, which is why I put it in the frontScript. Besides, in the frontScript, it works no matter which stack or substack I close. This is important to me not just because I want to suppress the save dialog, but I actively set properties as a poor man’s stack global variables, so making sure the stack is saved when I close it is a necessary part of my applications, and giving the user the change to discard changes can adversely affect the operation of my applications. Bob S On Feb 5, 2015, at 11:45 , FlexibleLearning.com http://FlexibleLearning.com ad...@flexiblelearning.commailto: ad...@flexiblelearning.com wrote: The IDE can be easily suppressed with... on closeStackRequest lock messages save this stack pass closeStackRequest end closeStackRequest Hugh Senior FLCo ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
It’s called gREVStackStatus. Given: on closeStackRequest save this stack put gREVStackStatus into aStackStatus put empty into aStackStatus [Customer Search] put aStackStatus into gREVStackStatus pass closeStackRequest end closeStackRequest Still no workie. I still get the save dialog. The dialog is firing before the saveStackRequest message. That is the problem. I will look for another message that may be getting sent. Bob S On Feb 5, 2015, at 09:56 , Peter Haworth p...@lcsql.com wrote: I think there's a global array in the IDE keyed by stack name with a value of true/false that indicates whether the stack is dirty. You could probably set that appropriately but unfortunately, I can't remember its name, except that it begins with g!!! Pete lcSQL Software http://www.lcsql.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
Is empty the right value? I thought it had true/false in the values. Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.html On Thu, Feb 5, 2015 at 10:18 AM, Bob Sneidar bobsnei...@iotecdigital.com wrote: It’s called gREVStackStatus. Given: on closeStackRequest save this stack put gREVStackStatus into aStackStatus put empty into aStackStatus [Customer Search] put aStackStatus into gREVStackStatus pass closeStackRequest end closeStackRequest Still no workie. I still get the save dialog. The dialog is firing before the saveStackRequest message. That is the problem. I will look for another message that may be getting sent. Bob S On Feb 5, 2015, at 09:56 , Peter Haworth p...@lcsql.com wrote: I think there's a global array in the IDE keyed by stack name with a value of true/false that indicates whether the stack is dirty. You could probably set that appropriately but unfortunately, I can't remember its name, except that it begins with g!!! Pete lcSQL Software http://www.lcsql.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
Hi all. Simple workaround. Aren’t most workarounds simple in the end? Include this in a frontScript: on closeStackRequest save stack the currentWindow pass closeStackRequest end closeStackRequest Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
I think there's a global array in the IDE keyed by stack name with a value of true/false that indicates whether the stack is dirty. You could probably set that appropriately but unfortunately, I can't remember its name, except that it begins with g!!! Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.html On Thu, Feb 5, 2015 at 9:35 AM, Bob Sneidar bobsnei...@iotecdigital.com wrote: Had to pass closeStackRequest, but I still get the menu. I am not sure there is a way in LC to do this, and there ought to be. Perhaps I’ll include a feature request for this, something like a property called suppressSavePrompt. It can be set to values “save” or “close”. Bob S On Feb 5, 2015, at 09:17 , Bob Sneidar bobsnei...@iotecdigital.com mailto:bobsnei...@iotecdigital.com wrote: Didn’t work. Bob S on closeStackRequest dispatch menuPick to btn File of grp revMenuBar \ of stack revMenuBar with Save end closeStackRequest ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
The IDE can be easily suppressed with... on closeStackRequest lock messages save this stack pass closeStackRequest end closeStackRequest Hugh Senior FLCo Bob Sneidar wrote: Nope. You would think it does, but I have this in the stack script: on closeStackRequest save this stack pass closeStackRequest end closeStackRequest I still get the save dialog when I close it. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
How to detect that user closed window
Hi all. Did anyone ever find a workaround for detecting that the user clicked the Close Window control, so I can intercept it and save the stack so Livecode does not ask? I suppose I could save the damn stack overtime I do anything in any handler, but GEEZE. Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to detect that user closed window
On 2/4/2015 4:22 PM, Bob Sneidar wrote: Did anyone ever find a workaround for detecting that the user clicked the Close Window control, so I can intercept it and save the stack so Livecode does not ask? I suppose I could save the damn stack overtime I do anything in any handler, but GEEZE. Doesn't closeStackRequest work? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode