Re: Some more questions on NSOpenPanel
no, this is the save dialog. i'm talking about the text edit field. i want to be able to cut / copy / paste / select all in the TE field of the save dialog On Sep 30, 2009, at 4:05 PM, Ken Thomases wrote: On Sep 30, 2009, at 5:57 PM, David M. Cotter wrote: so am i just out of luck on this? i am completely out of ideas. So, forgive me if this was covered earlier in the thread... You have set the open panel to allow multiple selections, right? [panel setAllowsMultipleSelection:YES] Regards, Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Some more questions on NSOpenPanel
On Sep 30, 2009, at 5:57 PM, David M. Cotter wrote: so am i just out of luck on this? i am completely out of ideas. So, forgive me if this was covered earlier in the thread... You have set the open panel to allow multiple selections, right? [panel setAllowsMultipleSelection:YES] Regards, Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Some more questions on NSOpenPanel
so am i just out of luck on this? i am completely out of ideas. On Sep 30, 2009, at 12:57 PM, David M. Cotter wrote: we set the menu itself to be it's own first responder this app came from legacy carbon code and we still go thru the ancient menu dispatching mechanism. the menu's own first responder all it does is take note of the menu ID and menu item index and fake up the result of the old "menuselect" function, and send that fake event to the app to handle, since that's what it knows how to handle. but that's not the issue now with the cocoa dialog. before the dialog comes up i've done everything expected (AFAIK) but the menu still is disabled. On Sep 30, 2009, at 12:47 PM, Kyle Sluder wrote: Why was the menu item ever not connected to First Responder? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Some more questions on NSOpenPanel
we set the menu itself to be it's own first responder this app came from legacy carbon code and we still go thru the ancient menu dispatching mechanism. the menu's own first responder all it does is take note of the menu ID and menu item index and fake up the result of the old "menuselect" function, and send that fake event to the app to handle, since that's what it knows how to handle. but that's not the issue now with the cocoa dialog. before the dialog comes up i've done everything expected (AFAIK) but the menu still is disabled. On Sep 30, 2009, at 12:47 PM, Kyle Sluder wrote: Why was the menu item ever not connected to First Responder? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Some more questions on NSOpenPanel
Why was the menu item ever not connected to First Responder? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Some more questions on NSOpenPanel
If anyone has any clue at all on this, or even some random thing that i could try to get this to work, i'd be most syked. thanks again. Just before we put up the dialog, we enable undo, cut, copy, paste, clear, and select all. these items all have the correct HICommand assigned (eg: "select all" has kHICommandSelectAll as it's "tag") Tag? kHICommandSelectAll? This is the cocoa-dev list. ;-) okye, well yes: [nsMenuItem setTag: kHICommandSelectAll]; The Select All item needs a target of First Responder and an action of -selectAll:. okay fine. so just before i put up the OS dialog, i now set the action to selectAll and the target to nil (first reponder, right?) [nsMenuItem setAction:@selector(selectAll:)]; [nsMenuItem setTarget:nil]; i also enable the menu item then i put up my NSPanel (the save dialog) however the edit menu is completely disabled, specifically the SelectAll command is still disabled. what else could i possibly be missing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Some more questions on NSOpenPanel
Just before we put up the dialog, we enable undo, cut, copy, paste, clear, and select all. these items all have the correct HICommand assigned (eg: "select all" has kHICommandSelectAll as it's "tag") Tag? kHICommandSelectAll? This is the cocoa-dev list. ;-) okye, well yes: [nsMenuItem setTag: kHICommandSelectAll]; The Select All item needs a target of First Responder and an action of -selectAll:. okay fine. so just before i put up the OS dialog, i now set the action to selectAll and the target to nil (first reponder, right?) [nsMenuItem setAction:@selector(selectAll:)]; [nsMenuItem setTarget:nil]; i also enable the menu item then i put up my NSPanel (the save dialog) however the edit menu is completely disabled, specifically the SelectAll command is still disabled. what else could i possibly be missing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Some more questions on NSOpenPanel
On Tue, Sep 29, 2009 at 3:52 PM, David M. Cotter wrote: > Just before we put up the dialog, we enable undo, cut, copy, paste, clear, > and select all. these items all have the correct HICommand assigned (eg: > "select all" has kHICommandSelectAll as it's "tag") Tag? kHICommandSelectAll? This is the cocoa-dev list. ;-) The Select All item needs a target of First Responder and an action of -selectAll:. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Some more questions on NSOpenPanel
originally from Frameworks IT list: Vlad: For some reason cmd-A does not work in our NSOpenPanel to select the current contents of the browser but navigation keystrokes do work. Is there something obvious that I am missing? Any clues? Corbin: Do you have an edit menu with Select All (Cmd-A)? If not..you might have to add one. Others may chime in if there is a different work around. Vlad: Our app does have Select All in Edit menu but since NSOpenModal is run as modal dialog, it is disabled with the rest of menu commands. I did a quick (far from exhaustive) survey and see that Apple apps enable Select All when modal dialog is up but non-Apple apps disable it. The fully disabled Edit menu worked fine with NavServices (select all did select files in Open dialog) but is different in Cocoa. Are you saying that if Select All is enabled when NSOpenPanel is up, then it will magically work? How does NSOpenPanel know that this command is selected if it is processed by the app’s event handling system? Sorry if it is something obvious but I am not sure I understand how it is supposed to work. Corbin: Yes -- it will work. The reason why, is because the command is sent up the responder chain. Me: well, sadly it still does not work. Just before we put up the dialog, we enable undo, cut, copy, paste, clear, and select all. these items all have the correct HICommand assigned (eg: "select all" has kHICommandSelectAll as it's "tag") the only possibly different thing is that these items have their "action" set to something other than default. would this make a difference? other than that, what could be causing this to fail? all items end up disabled, and it's not us disabling them.___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com