Re: Overriding system shortcuts in OSX

2015-11-09 Thread Howard Bornstein
I saw this when I tried to assign Cmd-H to a menu item. It simply did not
show up in the menu because Apple uses Cmd-H to hide the current
application.

Even assuming that Apple traps the Quit command and handles it, when I
assigned Cmd-Q with a multi-stack stand alone, it didn't work. I had to use
the solution proposed by Martin Koob:

Each of the substacks' scripts have a shutdownRequest handler but not a
'pass shutdownRequest' command.  This handler sends a prepareToQuit command
to the main card of the main stack.

substack stack script
---
on shutdownRequest
   send "preparetoquit" to card "main" of stack "mainstack"
end shutdownRequest
--
The main card of the main stack has the prepareToQuit handler which just has
a quit command.  This triggers the shutdownRequest handler in the main card.
This shutdownRequest handler has all of the code you want implemented before
quitting.  This handler has the 'pass shutdownRequest' command that allows
the application to quit.

Mainstack >card "main" script
---
on preparetoquit
quit
end preparetoquit

on shutdownRequest


pass shutdownRequest
end shutdownRequest


On Mon, Nov 9, 2015 at 9:20 AM, Bob Sneidar 
wrote:

> Oddly, when I have a Quit command in a custom menu, the option does not
> show up. I think this is because the Livecode menu has a Quit option
> already, which when using the browse tool will hilite when pressing CMD-Q,
> but will not actually quit. I have not tested this in a standalone yet.
>
> I have no shutDownRequest commands in my scripts.
>
> Bob S
>
>
> On Nov 7, 2015, at 10:54 , J. Landman Gay  > wrote:
>
> OS X traps and responds to its own system-wide shortcuts and does not pass
> them on to the app, so LC won't know about those.
>
> But Cmd-Q behaves slightly differently. OS X does notify the app so it can
> put up save dialogs or do other housekeeping. If Cmd-Q isn't working, then
> there is probably something in your app that prevents it from quitting,
> like pending messages, open drivers, not passing "shutdownRequest", etc.
>
> On 11/6/2015 4:20 PM, Bob Sneidar wrote:
> It's my understanding that with OS X you cannot do this. I would like to
> make a quit hotkey so users can quit my application, but I cannot seem to
> get that to work.
>
> 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
>



-- 
Regards,

Howard Bornstein
---
www.designeq.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: Overriding system shortcuts in OSX

2015-11-09 Thread Bob Sneidar
Oddly, when I have a Quit command in a custom menu, the option does not show 
up. I think this is because the Livecode menu has a Quit option already, which 
when using the browse tool will hilite when pressing CMD-Q, but will not 
actually quit. I have not tested this in a standalone yet.

I have no shutDownRequest commands in my scripts.

Bob S


On Nov 7, 2015, at 10:54 , J. Landman Gay 
mailto:jac...@hyperactivesw.com>> wrote:

OS X traps and responds to its own system-wide shortcuts and does not pass them 
on to the app, so LC won't know about those.

But Cmd-Q behaves slightly differently. OS X does notify the app so it can put 
up save dialogs or do other housekeeping. If Cmd-Q isn't working, then there is 
probably something in your app that prevents it from quitting, like pending 
messages, open drivers, not passing "shutdownRequest", etc.

On 11/6/2015 4:20 PM, Bob Sneidar wrote:
It's my understanding that with OS X you cannot do this. I would like to make a 
quit hotkey so users can quit my application, but I cannot seem to get that to 
work.

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: Overriding system shortcuts in OSX

2015-11-08 Thread Howard Bornstein
Thanks, Jacq,

This is helpful.

On Sat, Nov 7, 2015 at 7:45 PM, J. Landman Gay 
wrote:

> On 11/7/2015 2:23 PM, Howard Bornstein wrote:
>
>> Do you know which system-wide shortcuts OS X traps? Cmd-H is the one I
>> found (Hide Apps) and Cmd-Q (for which there is a LC solution). I'm
>> wondering which other ones we might get stung on. Are you aware of a list
>> of these traps?
>>
>
> Apple has a list here:
> 
>
> You'll probably be able to recognize the ones that LC supports. The ones
> that are system-wide will override; for example, Cmd-M is going to minimize
> to the dock, Cmd-spacebar is going to give you Spotlight.
>
>
> --
> 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
>



-- 
Regards,

Howard Bornstein
---
www.designeq.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: Overriding system shortcuts in OSX

2015-11-07 Thread J. Landman Gay

On 11/7/2015 2:23 PM, Howard Bornstein wrote:

Do you know which system-wide shortcuts OS X traps? Cmd-H is the one I
found (Hide Apps) and Cmd-Q (for which there is a LC solution). I'm
wondering which other ones we might get stung on. Are you aware of a list
of these traps?


Apple has a list here:


You'll probably be able to recognize the ones that LC supports. The ones 
that are system-wide will override; for example, Cmd-M is going to 
minimize to the dock, Cmd-spacebar is going to give you Spotlight.


--
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


Re: Overriding system shortcuts in OSX

2015-11-07 Thread Howard Bornstein
Do you know which system-wide shortcuts OS X traps? Cmd-H is the one I
found (Hide Apps) and Cmd-Q (for which there is a LC solution). I'm
wondering which other ones we might get stung on. Are you aware of a list
of these traps?

On Sat, Nov 7, 2015 at 10:54 AM, J. Landman Gay 
wrote:

> OS X traps and responds to its own system-wide shortcuts and does not pass
> them on to the app, so LC won't know about those.
>
> But Cmd-Q behaves slightly differently. OS X does notify the app so it can
> put up save dialogs or do other housekeeping. If Cmd-Q isn't working, then
> there is probably something in your app that prevents it from quitting,
> like pending messages, open drivers, not passing "shutdownRequest", etc.
>
>
> On 11/6/2015 4:20 PM, Bob Sneidar wrote:
>
>> It's my understanding that with OS X you cannot do this. I would like to
>> make a quit hotkey so users can quit my application, but I cannot seem to
>> get that to work.
>>
>> Bob S
>>
>>
>> On Nov 6, 2015, at 13:56 , Howard Bornstein > > wrote:
>>
>> I want to command-H for a menu item in my standalone, but it doesn't work
>> because the system uses command-H for Hide Application. Even though I've
>> assigned this shortcut to a menu item, it is ignored and the system
>> command
>> is used instead.
>>
>> It seems like this should be simple but I can't figure out how to get
>> around this problem. Is there a way to override system shortcuts in an OSX
>> standalone application?
>>
>> --
>> Regards,
>>
>> Howard Bornstein
>>
>> ___
>> 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
>>
>>
>
> --
> 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
>



-- 
Regards,

Howard Bornstein
---
www.designeq.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: Overriding system shortcuts in OSX

2015-11-07 Thread J. Landman Gay
OS X traps and responds to its own system-wide shortcuts and does not 
pass them on to the app, so LC won't know about those.


But Cmd-Q behaves slightly differently. OS X does notify the app so it 
can put up save dialogs or do other housekeeping. If Cmd-Q isn't 
working, then there is probably something in your app that prevents it 
from quitting, like pending messages, open drivers, not passing 
"shutdownRequest", etc.


On 11/6/2015 4:20 PM, Bob Sneidar wrote:

It's my understanding that with OS X you cannot do this. I would like to make a 
quit hotkey so users can quit my application, but I cannot seem to get that to 
work.

Bob S


On Nov 6, 2015, at 13:56 , Howard Bornstein 
mailto:bornst...@designeq.com>> wrote:

I want to command-H for a menu item in my standalone, but it doesn't work
because the system uses command-H for Hide Application. Even though I've
assigned this shortcut to a menu item, it is ignored and the system command
is used instead.

It seems like this should be simple but I can't figure out how to get
around this problem. Is there a way to override system shortcuts in an OSX
standalone application?

--
Regards,

Howard Bornstein

___
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




--
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


Re: Overriding system shortcuts in OSX

2015-11-06 Thread Howard Bornstein
After some difficulty, I've been able to get Quit to work, but the
command-Q part is handled by the system. What are you trying to do?

On Fri, Nov 6, 2015 at 4:24 PM, Bob Sneidar 
wrote:

> Yes. You can assign it, but it does nothing.
>
> Bob S
>
>
> On Nov 6, 2015, at 14:30 , Howard Bornstein  > wrote:
>
> Is there a list of system shortcuts that can't be overridden? When you say
> you want to make a quit hotkey, do you mean you want to assign command-Q to
> a menu item?
>
> ___
> 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
>



-- 
Regards,

Howard Bornstein
---
www.designeq.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: Overriding system shortcuts in OSX

2015-11-06 Thread Bob Sneidar
Yes. You can assign it, but it does nothing.

Bob S


On Nov 6, 2015, at 14:30 , Howard Bornstein 
mailto:bornst...@designeq.com>> wrote:

Is there a list of system shortcuts that can't be overridden? When you say
you want to make a quit hotkey, do you mean you want to assign command-Q to
a menu item?

___
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: Overriding system shortcuts in OSX

2015-11-06 Thread Howard Bornstein
Is there a list of system shortcuts that can't be overridden? When you say
you want to make a quit hotkey, do you mean you want to assign command-Q to
a menu item?

On Fri, Nov 6, 2015 at 2:20 PM, Bob Sneidar 
wrote:

> It's my understanding that with OS X you cannot do this. I would like to
> make a quit hotkey so users can quit my application, but I cannot seem to
> get that to work.
>
> Bob S
>
>
> On Nov 6, 2015, at 13:56 , Howard Bornstein  > wrote:
>
> I want to command-H for a menu item in my standalone, but it doesn't work
> because the system uses command-H for Hide Application. Even though I've
> assigned this shortcut to a menu item, it is ignored and the system command
> is used instead.
>
> It seems like this should be simple but I can't figure out how to get
> around this problem. Is there a way to override system shortcuts in an OSX
> standalone application?
>
> --
> Regards,
>
> Howard Bornstein
>
> ___
> 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
>



-- 
Regards,

Howard Bornstein
---
www.designeq.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: Overriding system shortcuts in OSX

2015-11-06 Thread Bob Sneidar
It's my understanding that with OS X you cannot do this. I would like to make a 
quit hotkey so users can quit my application, but I cannot seem to get that to 
work.

Bob S


On Nov 6, 2015, at 13:56 , Howard Bornstein 
mailto:bornst...@designeq.com>> wrote:

I want to command-H for a menu item in my standalone, but it doesn't work
because the system uses command-H for Hide Application. Even though I've
assigned this shortcut to a menu item, it is ignored and the system command
is used instead.

It seems like this should be simple but I can't figure out how to get
around this problem. Is there a way to override system shortcuts in an OSX
standalone application?

--
Regards,

Howard Bornstein

___
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