Re: Text field and copy/paste... (still doesn't work)
Re: Text field and copy/paste... (still doesn't work)
- Subject: Re: Text field and copy/paste... (still doesn't work)
- From: Stefan Jung <email@hidden>
- Date: Thu, 27 Sep 2001 19:31:03 +0200
Thierry,
While I am not sure how your program looks like, I would guess you have
to make the mytextField FirstResponder, not the window.
>
Hi,
>
>
I am unable to get cut,copy..; working using menu (and shortcut).
>
>
Here is the content of my MainMenu.nib :
>
>
WindowController (NSObject, contains outlets for the mainWindow)
>
>
File'sOwner
>
delegate->WindowController
>
>
mytextField (NSTextField), I want to use cut/paste on it
>
target : FirstResponder.initialFirstResponder
>
>
EditMenu (NSMenu) it appears when I click onto a button as a contextual
>
menu, contain Cut,Paste...
>
Cut - target : FirstResponder.cut
>
Copy - target : FirstResponder.copy
>
>
And at the beginning I call [WindowController
>
makeFirstResponder:mainWindow]
[WindowController makeFirstResponder:mytextField]
>
>
mainWindow is my main window containing the text view.
>
>
But it doesn't work, the edit menu is disabled, and it seems that cut
>
function is called in WindowController.
>
>
I need to recall that I have a custom window withtout a menu bar,
>
because my application is still in foreground.
>
The main menu is visible when user clicks on a button (contextual menu).
>
>
What is the problem ?
>
>
Thanks a lot for your help
>
>
Thierry
>
_______________________________________________
>
cocoa-dev mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev