Re: NSInvocation problem - "NSView not correctly initialized"
Re: NSInvocation problem - "NSView not correctly initialized"
- Subject: Re: NSInvocation problem - "NSView not correctly initialized"
- From: Robert Nikander <email@hidden>
- Date: Mon, 5 Nov 2007 11:17:10 -0500
On Nov 5, 2007, at 10:43 AM, Clark Cox wrote:
You never called any of the "init..." methods.
On Nov 5, 2007, at 10:15 AM, Gorazd Krosl wrote:
ObjC requires an additional -init message to
Unfortunately, this is not the problem... In real code I call
"init...", but I removed those calls from the demo program to show
the problem with the least amount of code. I forgot to mention that
the error only occurs in the final call to "alloc" -- the call via
the NSInvocation. The first two calls to "alloc" are fine, as they
should be, since it is not an error to call [NSButton alloc]. It is
only an error to try to use the object (ie, call other methods on it)
without first calling "init...".
So, these lines do not cause an error message:
b = [NSButton alloc];
b = objc_msgSend(button_class, alloc_sel);
but this line does:
[inv invoke];
despite the fact that they are, I think (?), doing the same thing.
So what is different about calling through the NSInvocation that
causes the error message?
thanks,
Rob
_______________________________________________
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