Hi all,

I am trying to take an array (decendentParts()) of "Part" objects and filter only for the elements that are of the subclass "Finished".

Before Generics, I simply used: (yes, yes, I know I shouldn't be using qualifierWithQualifierFormat - please let it go, this one time)

EOQualifier qual = EOQualifier.qualifierWithQualifierFormat("partTypeId = 3", null); NSArray descendantFinisheds = EOQualifier.filteredArrayWithQualifier(descendantParts(), qual);

But now, with generics, the compiler complains that it can't convert from "Part" to "Finished". Which I completely understand because there's no way for the compiler to know that I just filtered for a subclass and that all I'm going to get out of the filter process is Finished objects so the statement is valid. As far as it's concerned, I could be getting any subclass of "Part" back.

My question is, how do I filter so that the compiler will know that the results of the filter truly are Finished objects?

Dave

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to