[futurebasic] Re: [FB] Option Key in Menus

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2002 : Group Archive : Group : All Groups

From: Rich Love <richlove@...>
Date: Fri, 13 Dec 2002 06:27:44 -0600
Hmmm... don't know where the space came from.
It is not in my original code here.

On Thursday, December 12, 2002, at 09:44  AM, Joe Lewis Wilkins wrote:

> Hi Rich,
>
> I inserted your code into one of my programs (Release 7, OS 9.2) and  
> it works perfectly without anything additional; however, you will  
> notice the last constant (_kMenuOptionModifi er) has a space in it  
> which I had to fix first. You may be having problems with your other  
> constants. This is what I used:
>
> mHndl = FN GetMenuHandle(_FileMenu)
> call SetItemCmd(mHndl,_iOpenFile,_"O")
> osErr = FN SetMenuItemModifiers(mHndl,_iOpenFile,_kMenuOptionModifier )
>
> I changed some of the Vars and constants to match those I already had.  
> It calls the same FN as when it was only Command/O,  which it  should.  
> I assume you hold down both the Command AND Option Keys before you  
> press "n". Some users don't do that properly. :-)
>
> HTH,
>
> Joe Wilkins
>
> Rich Love wrote:
>
>> Sorry, I meant Command-Option
>> I was hoping that I would not need to use KeyDown events.
>>
>> On Thursday, December 12, 2002, at 08:04  AM, Joe Lewis Wilkins wrote:
>>
>>> Rich Love wrote:
>>>
>>>> I am using the following statements to modify a menu so it will  
>>>> work   with Option N from the keyboard.
>>>> It does put the Option N symbol in the menu item.
>>>> However, when I do an Option N on the keyboard, nothing happens.
>>>
>>>
>>> You would have to do a Command/Option/n if it were to work, but you   
>>> may also have to trap for keyDown events as well. Not sure how much   
>>> the runtimes handle for the menus now, since the other Command Keys   
>>> appear to operate without additional work on our part.
>>>
>>> Joe Wilkins
>>>
>>>>
>>>> What else do I need to do to make it work from the keyboard?
>>>> I am running Carbon / standard basic / OS X
>>>>
>>>> menuH = FN GetMenuHandle(_CaptureMenu)
>>>> call SetItemCmd(menuH,_MakeaNewCaptureFileItem,_"N")
>>>> err = FN    
>>>> SetMenuItemModifiers(menuH,_MakeaNewCaptureFileItem,_kMenuOptionModi 
>>>> fi er )
>>>>
>>>>
>>>> Rich Love - Carnation Software
>>>> Terminal emulations for Macintosh - MacWise, MacToPic + and SBMac.
>>>> richlove@...
>>>> http://www.carnation-software.com
>>>> 512 858-9234
>>>
>>>
>>>
>>>
>>>
>>> --
>>> To unsubscribe, send ANY message to   
>>> <futurebasic-unsubscribe@...>
>>>
>>>
>>>
>> Rich Love - Carnation Software
>> Terminal emulations for Macintosh - MacWise, MacToPic + and SBMac.
>> richlove@...
>> http://www.carnation-software.com
>> 512 858-9234
>>
>>
>> --
>> To unsubscribe, send ANY message to  
>> <futurebasic-unsubscribe@...>
>>
>>
>
>
>
> --
> To unsubscribe, send ANY message to  
> <futurebasic-unsubscribe@...>
>
>
>
Rich Love - Carnation Software
Terminal emulations for Macintosh - MacWise, MacToPic + and SBMac.
richlove@...
http://www.carnation-software.com
512 858-9234