Re: Dialog Command Keys

2011-07-27 Thread Bill Appleton
hi kyle i agree. we are in transition that direction, its great to see the mac growing in popularity it provides justification for the effort. best bill On Wed, Jul 27, 2011 at 12:13 PM, Kyle Sluder wrote: > On Wed, Jul 27, 2011 at 11:57 AM, Bill Appleton > wrote: > > our app is enterprise

Re: Dialog Command Keys

2011-07-27 Thread Kyle Sluder
On Wed, Jul 27, 2011 at 11:57 AM, Bill Appleton wrote: > our app is enterprise software and has one code base for windows and mac so > this issue was related to the portability requirements Perhaps you could use the problems you've encountered in this thread to advocate for giving the requisite d

Re: Dialog Command Keys

2011-07-27 Thread Bill Appleton
Thanks Raleigh that fixes the problem. I had a single handler for all menu items that used menu tags to get a menu and item id, so i will apply your fix below. our app is enterprise software and has one code base for windows and mac so this issue was related to the portability requirements bes

Re: Dialog Command Keys

2011-07-27 Thread Raleigh Ledet
The target of the menus should be nil and you need to set the action to what standard controls expect them to be. Namely: cut: @selector(cut:) copy: @selector(copy:) paste: @selector(paste:) so basically: [cutMenuItem setTarget:nil] [cutMenuItem setAction:@selector(cut:)] This of course means

Re: Dialog Command Keys

2011-07-27 Thread Bill Appleton
hi all, oh man i hate to belabor this issue but i have studied every suggestion and the docs and i cannot figure this out the problem is that i cannot get command keys to work on dialog text, even dialogs run and managed by cocoa as suggested i set the target for my menu items to nil, and also m

Re: Dialog Command Keys

2011-07-26 Thread Bill Appleton
hi greg, this application is the dreamfactory player, this is a stand-alone development environment and also a NPAPI plugin for chrome, safari and firefox. there are huge limitations for npapi, for example, we only get a core graphics surface to draw the app on not an nsview or an nswindow the code

Re: Dialog Command Keys

2011-07-26 Thread Gregory Weston
Bill Appleton wrote: > Based on my app, the dialog boxes have to be created dynamically, so i can't > use Interface Builder, so they are assembled out of cocoa controls as > needed. > > My dialogs beep when i control-x to cut some selected text > > What is the simple way for my dialog window to

Re: Dialog Command Keys

2011-07-26 Thread Kyle Sluder
On Tue, Jul 26, 2011 at 10:30 AM, Bill Appleton wrote: > hi all > > i set the target and the action on my menu items -- this is so that i can > get my handler called when someone selects a menu item > i will re-read the event handler docs with regard to menu items (no keyboard > issues) and see if

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 10:30, Bill Appleton wrote: > i set the target and the action on my menu items -- this is so that i can get > my handler called when someone selects a menu item > i will re-read the event handler docs with regard to menu items (no keyboard > issues) and see if that helps Yo

Re: Dialog Command Keys

2011-07-26 Thread Matt Neuburg
On Tue, 26 Jul 2011 09:03:19 -0700, Bill Appleton said: >The items in the main menu DO have the standard key bindings, they are >disabled when the modal dialogs come up Well, that's a bug you need to fix. This might help: http://www.cocoabuilder.com/archive/cocoa/119051-small-notes-on-enabling-

Re: Dialog Command Keys

2011-07-26 Thread Bill Appleton
hi all i set the target and the action on my menu items -- this is so that i can get my handler called when someone selects a menu item i will re-read the event handler docs with regard to menu items (no keyboard issues) and see if that helps thx bill On Tue, Jul 26, 2011 at 10:02 AM, Joar W

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 09:43, Raleigh Ledet wrote: >> Well, when the dialog field has selected text and i type command-x my menu >> item's action handler is NOT invoked, because there is a modal dialog up I >> guess. > > Wait! Are you saying that you modified the default target/action setup of the

Re: Dialog Command Keys

2011-07-26 Thread Bill Appleton
hi all, >> Wait! Are you saying that you modified the default target/action setup of the Cut menu in your main nib file? If so, that would explain everything. >> try starting again with a standard NIB and inspect each item to see what things you may be missing. i think this is the right track, ou

Re: Dialog Command Keys

2011-07-26 Thread Gary L. Wade
You had mentioned earlier that your UI is programmatically generated; are your menus also in that category? If so, and they need to remain that way, try starting again with a standard NIB and inspect each item to see what things you may be missing. - Gary L. Wade (Sent from my iPhone)

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 09:32, Bill Appleton wrote: > >> OK, great. In that case it's weird that your cut/copy/paste items are not > >> enabled while a text field in your dialog has focus. You have focus set in > >> one of your text fields / views, right? > > I just tried enabling the edit menu it

Re: Dialog Command Keys

2011-07-26 Thread Andy Lee
On Jul 26, 2011, at 12:32 PM, Bill Appleton wrote: > On microsoft windows if you have a text field up on a dialog with > focus it just responds to control-x and cuts the text. It doesn't matter > what is happening in the application menus. On the Mac, Command-X typically just works as well. The me

Re: Dialog Command Keys

2011-07-26 Thread Raleigh Ledet
On Jul 26, 2011, at 9:32 AM, Bill Appleton wrote: > I just noticed that even if i bring up a stock dialog (like the put file > dialog to save a file) that command-x still doesn't work. for these dialogs > it DOES flash (hilite) that menu, but no cutting happens. So I don't think > it matters how i

Re: Dialog Command Keys

2011-07-26 Thread Bill Appleton
I just noticed that even if i bring up a stock dialog (like the put file dialog to save a file) that command-x still doesn't work. for these dialogs it DOES flash (hilite) that menu, but no cutting happens. So I don't think it matters how i am running the modal dialogs, because a stock dialog (coco

Re: Dialog Command Keys

2011-07-26 Thread Bill Appleton
>> OK, great. In that case it's weird that your cut/copy/paste items are not enabled while a text field in your dialog has focus. You have focus set in one of your text fields / views, right? I just tried enabling the edit menu items when a dialog is up, that didn't change anything. The NSTextFie

Re: Dialog Command Keys

2011-07-26 Thread Andy Lee
On Jul 26, 2011, at 12:03 PM, Bill Appleton wrote: > The items in the main menu DO have the standard key bindings, they are > disabled when the modal dialogs come up That is odd. My question is, how do those menu items "know" to be enabled when we run a modal dialog the more usual way, using a ni

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 09:03, Bill Appleton wrote: > The items in the main menu DO have the standard key bindings, they are > disabled when the modal dialogs come up > The items in the right-click menu do NOT have the key bindings but they are > enabled, i didn't make these menus > The dialogs are

Re: Dialog Command Keys

2011-07-26 Thread Bill Appleton
The items in the main menu DO have the standard key bindings, they are disabled when the modal dialogs come up The items in the right-click menu do NOT have the key bindings but they are enabled, i didn't make these menus The dialogs are modal I agree it should just work. Is the problem that the

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 08:09, Bill Appleton wrote: > There ARE cut, copy, and paste items in this menu, but they DONT have any > command key bindings, maybe that is the problem? i didn't create this menu > in the first place Yes, that is at least part of the problem. If the items in your main menu

Re: Dialog Command Keys

2011-07-26 Thread Bill Appleton
The main edit menu items are disabled when the dialog(s) come up. On Tue, Jul 26, 2011 at 8:23 AM, Kyle Sluder wrote: > On Jul 26, 2011, at 8:09 AM, Bill Appleton > wrote: > > And when i right-click in them i get a clever menu with search in google, > convert to uppercase, etc. > > > Please

Re: Dialog Command Keys

2011-07-26 Thread Kyle Sluder
On Jul 26, 2011, at 8:09 AM, Bill Appleton wrote: > And when i right-click in them i get a clever menu with search in google, > convert to uppercase, etc. Please note I said "menu bar," not "right-click menu." What about the items on the Edit menu? --Kyle Sluder > __

Re: Dialog Command Keys

2011-07-26 Thread Bill Appleton
Whoops yes, command-x So i create some NSTextFields on the dialog window (can't use Interface Builder, this is a dynamically created dialog) And when i right-click in them i get a clever menu with search in google, convert to uppercase, etc. There ARE cut, copy, and paste items in this menu, bu

Re: Dialog Command Keys

2011-07-26 Thread Kyle Sluder
On Jul 26, 2011, at 7:52 AM, Bill Appleton wrote: > BUT my question is that it seems like there ought to be an easy or automatic > way to do this. If i right-click on a text control i get a pop up menu with > cut, copy, and other options. That same control isn't smart enough to handle > the

Re: Dialog Command Keys

2011-07-26 Thread Bill Appleton
In the manual it says: "However, subclasses of other Application Kit classes (including custom views) need to provide their own implementations of performKeyEquivalent:. The implementation should extract the characters for a key equivalent from the passed-in NSEvent object using the charactersIgno

Re: Dialog Command Keys

2011-07-25 Thread Kyle Sluder
On Mon, Jul 25, 2011 at 1:43 PM, Bill Appleton wrote: > Hi all, > > Based on my app, the dialog boxes have to be created dynamically, so i can't > use Interface Builder, so they are assembled out of cocoa controls as > needed. > > My dialogs beep when i control-x to cut some selected text > > What

Dialog Command Keys

2011-07-25 Thread Bill Appleton
Hi all, Based on my app, the dialog boxes have to be created dynamically, so i can't use Interface Builder, so they are assembled out of cocoa controls as needed. My dialogs beep when i control-x to cut some selected text What is the simple way for my dialog window to pass these command keys eve