Re: Enabling cut and paste in modal window
Re: Enabling cut and paste in modal window
- Subject: Re: Enabling cut and paste in modal window
- From: Keary Suska <email@hidden>
- Date: Wed, 07 Nov 2007 08:59:08 -0700
- Thread-topic: Enabling cut and paste in modal window
on 11/6/07 9:28 PM, email@hidden 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@hidden 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"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden