• 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: isKindOfClass vs. loading bundles: nope?!?!?!?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isKindOfClass vs. loading bundles: nope?!?!?!?


  • Subject: Re: isKindOfClass vs. loading bundles: nope?!?!?!?
  • From: Andy Lee <email@hidden>
  • Date: Thu, 21 Mar 2002 04:52:01 -0500

At 5:10 AM +0100 3/21/02, Ondra Cada wrote:
if ([class ocs_isKindOfClass:[MLLoadableObject class]])
NSLog(@"got a class %@ (%d)",s,[class isKindOfClass:[MLLoadableObject class]]);
}
}
...
[...]
The printout is

2002-03-21 04:58:56.733 MLIndexing[9669] got a class MLCDocReader (0)

that (I mean the zero in the parentheses) should be nonsense, no? Or do I overlook something?

No, the zero makes sense. Remember, "class" is a Class, not an instance. If you wanted to see a 1 instead of the 0, you could change that NSLog line to:

NSLog(@"got a class %@ (%d)",s,
[[[class alloc] init] isKindOfClass:[MLLoadableObject class]]);

I could be wrong, but I suspect there is no built-in "+descendsFromClass:" method that does the same as your +ocs_isKindOfClass:. If there were, I'd expect it to have been declared in /usr/include/objc/Object.h. You could add it in a category.

--Andy
_______________________________________________
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.

  • Follow-Ups:
    • Re: isKindOfClass vs. loading bundles: nope?!?!?!?
      • From: Ondra Cada <email@hidden>
References: 
 >isKindOfClass vs. loading bundles: nope?!?!?!? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Spreadsheet Widget
  • Next by Date: Re: Spreadsheet Widget
  • Previous by thread: Re: Spreadsheet Widget
  • Next by thread: Re: isKindOfClass vs. loading bundles: nope?!?!?!?
  • Index(es):
    • Date
    • Thread