Re: How to detect that user closed window

2015-02-09 Thread Bob Sneidar
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 mailto:ambassa...@fourthworld.com>> wrote: Bob Sneidar wrote: > filename does not seem to be a property of a stack. T

Re: How to detect that user closed window

2015-02-06 Thread Mike Bonner
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 w

Re: How to detect that user closed window

2015-02-06 Thread Richard Gaskin
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

Re: How to detect that user closed window

2015-02-06 Thread Bob Sneidar
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 mailto:bonnm...@gmail.com>> wrote: Silly question, but.. the filename of the stack is set, right? If its em

Re: How to detect that user closed window

2015-02-05 Thread Mike Bonner
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 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

Re: How to detect that user closed window

2015-02-05 Thread Bob Sneidar
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 import

Re: How to detect that user closed window

2015-02-05 Thread FlexibleLearning.com
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 > >

Re: How to detect that user closed window

2015-02-05 Thread Bob Sneidar
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@

Re: How to detect that user closed window

2015-02-05 Thread Peter Haworth
Is empty the right value? I thought it had true/false in the values. Pete lcSQL Software Home of lcStackBrowser and SQLiteAdmin On Thu, Feb 5, 2015 at 10:18 AM, Bob Sneidar wrote: > It’s ca

Re: How to detect that user closed window

2015-02-05 Thread Bob Sneidar
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 di

Re: How to detect that user closed window

2015-02-05 Thread Peter Haworth
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

Re: How to detect that user closed window

2015-02-05 Thread Bob Sneidar
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,

Re: How to detect that user closed window

2015-02-05 Thread Bob Sneidar
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 mailto:ambassa...@fourthworld.com>> wrote: dispatch "menuPick" to btn "File" of

Re: How to detect that user closed window

2015-02-05 Thread Richard Gaskin
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

Re: How to detect that user closed window

2015-02-05 Thread Bob Sneidar
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 wrote: > > On 2/4/2015 4:22 PM, Bob Snei

Re: How to detect that user closed window

2015-02-04 Thread J. Landman Gay
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. Doe