Re: contextual menu and NSTextField
Re: contextual menu and NSTextField
- Subject: Re: contextual menu and NSTextField
- From: Arthur Clemens <email@hidden>
- Date: Fri, 13 Sep 2002 21:03:04 +0200
Your comments make sense. I was neglecting the documentation.
Bu there seems to be another issue. When I create a NSMenu instance in
IB and connect it to a NSTextField, it won't pop up in test mode. When
I connect it to other elements such as a NSTextView or a NSMovieView,
the menu works correctly.
NSTextField inherits from NSView, so it should inherit the menu
funcionality too.
When I call [NSTextField defaultMenu] I get null, while [NSTextView
defaultMenu] returns
default menu: <NSMenu: 0x1d2c20>
Title: Menu
Supermenu: 0x0 (None), autoenable: YES, change messages enabled: YES
Items: (
<MenuItem: 0x13d9870 Cut>,
<MenuItem: 0x13d9900 Copy>,
<MenuItem: 0x13d9990 Paste>,
<MenuItem: 0x13d9a20 >,
<MenuItem: 0x13d9a90 Spelling, submenu: 0x13d9b40 (Spelling)>,
<MenuItem: 0x13d97e0 Font, submenu: 0x13d92c0 (Font)>,
<MenuItem: 0x13d9d80 Speech, submenu: 0x13d9e40 (Speech)>
)
... although they both show the same standard contextual menu.
This seems strange.
Arthur
On vrijdag, sep 13, 2002, at 14:02 Europe/Amsterdam, Ondra Cada wrote:
On Friday, September 13, 2002, at 12:53 , Arthur Clemens wrote:
@implementation TextFieldWithContextualMenu
- (id)init {
...
but the init method is never called.
That would be since it is not the designated initializer: all controls
(all views, actually) are init'd by initWithFrame:, as cleanly
documented.
In IB I have made the right connection...
Nevertheless, for initialization of a nibbed object you want to use
awakeFromNib instead of different inits anyway.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.