• 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: Forcing finalization on the main thread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing finalization on the main thread?


  • Subject: Re: Forcing finalization on the main thread?
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Sun, 07 Sep 2008 17:16:14 -0700


On Sep 7, 2008, at 3:53 PM, Nick Zitzmann wrote:


On Sep 7, 2008, at 4:39 PM, Jean-Daniel Dupas wrote:

You can use perform on main thread using a class method and pass your structure as argument.


That worked; thanks. I wouldn't have guessed it, since that method wasn't documented as a class method, but it worked anyway...

According to the Obj-C docs [1], you can invoke NSObject instance methods on a class object:


"So that NSObject's methods don’t have to be implemented twice—once to provide a runtime interface for instances and again to duplicate that interface for class objects—class objects are given special dispensation to perform instance methods defined in the root class. When a class object receives a message that it can’t respond to with a class method, the runtime system determines whether there’s a root instance method that can respond. The only instance methods that a class object can perform are those defined in the root class, and only if there’s no class method that can do the job."

I thought I read this long ago in the NSObject API docs, but can't find it now. Anyway, at least this doesn't work just by accident (I checked because I use this trick myself :).

--
Adam


[1] http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_2_section_4.html

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Forcing finalization on the main thread? (From: Nick Zitzmann <email@hidden>)
 >Re: Forcing finalization on the main thread? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Forcing finalization on the main thread? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Forcing finalization on the main thread?
  • Next by Date: Interface Builder changing size of controls...
  • Previous by thread: Re: Forcing finalization on the main thread?
  • Next by thread: Re: Forcing finalization on the main thread?
  • Index(es):
    • Date
    • Thread