NSInvocation problem - "NSView not correctly initialized"
NSInvocation problem - "NSView not correctly initialized"
- Subject: NSInvocation problem - "NSView not correctly initialized"
- From: Gorazd Krosl <email@hidden>
- Date: Mon, 5 Nov 2007 10:15:03 -0500 (EST)
Hi Robert,
As the message says: "NSView not correctly
initialized", you are only allocating the instance of
NSButton. ObjC requires an additional -init message to
be send to it for initialzation. NSButton expects
-initWithFrame: at least, to correctly initialize its
NSView superclass.
I am not at my computer right now, so I do not
remember NSButton's designated initializer, but for
NSView the sequence is:
NSView *myView = [[NSView alloc]
initWithFrame:someFrame];
HTH
Gorazd
Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
_______________________________________________
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