• 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: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)


  • Subject: Re: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)
  • From: Andreas Grosam <email@hidden>
  • Date: Thu, 1 Apr 2010 20:25:33 +0200


On Apr 1, 2010, at 7:42 PM, Greg Parker wrote:

> On Apr 1, 2010, at 10:32 AM, Andreas Grosam wrote:
> It would be possible to declare a new NSThreadPerformingObject protocol that built upon the NSObject protocol. You could do this yourself if you like. But even that would only work for one Mac OS X version, because older OS versions had fewer thread perform methods and newer OS versions will likely add more.
Hence, I mentioned that I assume the framework is "more or less stable". But this is a possibly problem for any interface, including those from categories.

>
> In practice, what you really want is an instance that does everything class NSObject does, plus the delegate methods. The best way to write that is:
>   NSObject<SomeProtocol> *obj;

Ah yes, this will solve the compiler warning! Since in this case, the interfaces of categories will be implicitly added. In fact, I can declare my delegates like this.

Still, I see an advantage when using protocols. The argument of changing interfaces does not count IMO, since Categories are prone to changes as well. If sometimes the category get removed or the methods get changed, my code will not run anymore ;)
I don't think this will happen, though.

Thanks for replying and the hint!

Andreas


>
>
> --
> Greg Parker     email@hidden     Runtime Wrangler
>
>

_______________________________________________

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: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)
      • From: Greg Parker <email@hidden>
References: 
 >performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s) (From: Andreas Grosam <email@hidden>)
 >Re: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s) (From: Greg Parker <email@hidden>)

  • Prev by Date: NSLayerStack/NSArrayController/NSButton action puzzle
  • Next by Date: Re: Copy Folder Attributes of /dev
  • Previous by thread: Re: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)
  • Next by thread: Re: performSelector:onThread:withObject:waitUntilDone:' not found in protocol(s)
  • Index(es):
    • Date
    • Thread