• 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: Cocoa Headers Inconsistent With Online Docs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Headers Inconsistent With Online Docs


  • Subject: Re: Cocoa Headers Inconsistent With Online Docs
  • From: lbland <email@hidden>
  • Date: Wed, 11 Feb 2004 18:44:17 -0500

On Feb 11, 2004, at 5:40 PM, Daniel Todd Currie wrote:

The online cocoa documentation lists this method in NSObject:

- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait

However, the NSObject.h file in /System/Library/Frameworks does not list this method. I assume this is why I'm getting a compiler warning on my app regarding my usage of -performSelectorOnMainThread:. The app works just fine though...

So where is this method actually declared? Why is there this inconsistency? What can I do about this compiler warning? (I really hate having compiler warnings.)

Hum, I haven't thought of that method in a while, but did you see this in NSThread.h:

#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED
@interface NSObject (NSMainThreadPerformAdditions)

- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait modes:(NSArray *)array;
- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait;
// equivalent to the first method with kCFRunLoopCommonModes

@end
#endif

I always disliked that NSObject method. It makes much more sense to put it in a NSThread class. I am sure Scott is behind in his work on this, but I think the designers made a better choice...

Sometimes when methods get depreciated they are taken out of the .h, but left in the .m (so as to not break binaries) and the docs are last on the food chain...

thanks!-

-lance


Lance Bland
mailto:email@hidden
VVI
888-VVI-PLOT
http://www.vvi.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Cocoa Headers Inconsistent With Online Docs (From: Daniel Todd Currie <email@hidden>)

  • Prev by Date: Re: At my wits end with NSSound!
  • Next by Date: Re: Cocoa Headers Inconsistent With Online Docs
  • Previous by thread: Cocoa Headers Inconsistent With Online Docs
  • Next by thread: Re: Cocoa Headers Inconsistent With Online Docs
  • Index(es):
    • Date
    • Thread