• 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: Subclassing NSPredicate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSPredicate


  • Subject: Re: Subclassing NSPredicate
  • From: Stamenkovic Florijan <email@hidden>
  • Date: Fri, 02 Oct 2009 12:37:14 -0400


On Oct 02, 2009, at 12:17, Nick Zitzmann wrote:


On Oct 2, 2009, at 10:08 AM, Stamenkovic Florijan wrote:

The documentation does not discuss this as all, as far as I have looked through it. Googling brings up nothing. So I am wondering: is anyone doing this? Any caveats?

With a few exceptions (NSObject, NSFormatter, NSProxy, NSOperation, etc.), objects in Foundation are not made to be subclassed, unless you really know what you're doing.

This makes sense. I've noticed that a number of classes discuss subclassing in their documentation, and others (like NSPredicate) ominously avoid the subject.


What exactly are you trying to accomplish? If you're just trying to add methods to the class, then make a category instead.

At the moment nothing that I can't do with a compound predicate. It was more of a conceptual question, as writing custom filtering logic allows more flexibility, and is a handy thing to be able to do.


I guess I will just do it the standard way, for the time being,
Thx,
F
_______________________________________________

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: 
 >Subclassing NSPredicate (From: Stamenkovic Florijan <email@hidden>)
 >Re: Subclassing NSPredicate (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Subclassing NSPredicate
  • Next by Date: Re: reading (parsing) CSV (or Excel) data
  • Previous by thread: Re: Subclassing NSPredicate
  • Next by thread: View shifted up on iPhone simulator
  • Index(es):
    • Date
    • Thread