Re: Subclassing NSPredicate
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