Application quit on OS X

Pete pete at mollysrevenge.com
Sat Jan 21 00:57:35 EST 2012


On Fri, Jan 20, 2012 at 7:39 PM, J. Landman Gay <jacque at hyperactivesw.com>wrote:

> On 1/20/12 4:00 PM, Pete wrote:
>
>> OK, thanks Mark and Jacque.  It sounds like the shutdownRequest message
>> will do the job - if I don't pass it, the application should stay open.
>>  I'll have to figure out how to deal with the user selecting Quit from the
>> Application menu, or the user shutting down their computer since I really
>> do need to quit then.
>>
>
> I think it would be better to use closeStackRequest. That message is only
> sent when the user manually clicks in the close box, so you don't need to
> worry about your existing scripts. The handler can check to see if the
> target stack is the last stack open and if the OS is Mac. If so, don't
> close. That way you don't need to worry about quitting from the menu or
> shutdown.


The problem is, I want toc lose the stack but leave the application
running.  If I pass closeStackRequest, I believe the app will quit
(Standalone) and if I don't pass it, the window will stay open, neither of
which is what I need to happen.  But maybe I can close the stack in the
script and not pass the message and that won't quit the application, I'll
try that.

>
>
>  This just seems overly complicated to deal with a pretty standard way of
>> working for OS X applications.
>>
>
> It helps to remember that it's actually the Mac that is out of synch with
> the rest of the world in this respect. But if you trap that one message you
> should be okay and it should be pretty easy.


Well, I guess no it doesn't help to remember that :-)  Doesn't really
matter if the Mac is out of synch or not, Livecode's default should be what
is the most common behavior for the platform whether it's out of synch or
not.  But that's OK, there MAY be a way round it with closeStackRequest.


>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list