• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSInvocation problem - "NSView not correctly initialized"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSInvocation problem - "NSView not correctly initialized"
      • From: "Shawn Erickson" <email@hidden>
References: 
 >NSInvocation problem - "NSView not correctly initialized" (From: Robert Nikander <email@hidden>)
 >Re: NSInvocation problem - "NSView not correctly initialized" (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: Pages - save document
  • Next by Date: [ANN] NSOperation/NSOperationQueue tutorial
  • Previous by thread: Re: NSInvocation problem - "NSView not correctly initialized"
  • Next by thread: Re: NSInvocation problem - "NSView not correctly initialized"
  • Index(es):
    • Date
    • Thread