Skip navigation.
 
mlRe: Enabling cut and paste in modal window
FROM : Keary Suska
DATE : Wed Nov 07 16:59:08 2007

on 11/6/07 9:28 PM, <email_removed> purportedly said:

>
> I'm calling it from my main -awakeFromNib, so the main menu is
> loaded... I see the whole app menu, so I know its loading, it's just
> not active.


I remember having a problem some time ago that might be related. IIRC, I
dealt with it by using -performSelector:withObject:afterDelay:. Making the
app go through a run loop iteration seemed to allow everything to load
properly.

Otherwise, I am at a loss. I know there is nothing in -runModalForWindow:
that interferes with copy/paste, as I do this all the time. As long as there
is an object in the responder chain that responds to the copy/paste actions,
they should enable.

I am CC'ing the list in case there is someone else who has an idea.

> On Nov 6, 2007, at 6:57 PM, Keary Suska wrote:
>

>> on 11/6/07 3:53 PM, <email_removed> purportedly said:
>>

>>> The edit menu is not showing up at all.  Menus are all set to
>>> autoenable.  I haven't touched the default wiring of anything in the
>>> edit menu.  Quit is also not working.  None of the menu items are.
>>>
>>> The only strange thing I can think of that I'm doing  - the modal
>>> NSWindow is being loaded from a separate NIB, while the default menu
>>> is in MainMenu.nib

>>
>> It sounds like your modal panel is being loaded before the mainmenu
>> nib is
>> loaded. AFAIK, if the main menu isn't loaded, you won't get any menu
>> functions--note that copy/paste is usually a menu function. Even
>> keystroke
>> equivalents invoke menu items by default.
>>
>> I recommend bringing your panel up afterwards, such as from
>> -applicationDidFinishLaunching or in the NSApplication delegate
>> -awakeFromNib. If you can't do this, you'll need some sort of
>> workaround
>> such as invisible/offscreen buttons with key equivalents.


Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

Related mailsAuthorDate
mlEnabling cut and paste in modal window mike woodworth Nov 6, 22:00
mlRe: Enabling cut and paste in modal window Keary Suska Nov 6, 23:30
mlRe: Enabling cut and paste in modal window Keary Suska Nov 7, 16:59
mlRe: Enabling cut and paste in modal window Uli Kusterer Nov 7, 18:18