Newbie Key Value-coding and Subclasses Question
Newbie Key Value-coding and Subclasses Question
- Subject: Newbie Key Value-coding and Subclasses Question
- From: David Avendasora <email@hidden>
- Date: Thu, 9 Feb 2006 16:04:54 +0000
Hi.
I have a relationship from Label to Part (toOne)
Part has three subclasses: Raw, Intermediate and Finished. All of
these (Part, Raw, Intermediate and Finished) are all EOGenericRecord
classes right now.
I'm running into two problems
1) How do I perform an instanceof to determine what subclass of Part
takeStoredValueForKey("part") returns when run on a Label object? Do
I have to generate the custom classes first for Part and it's
subclasses?
2) How do I call subclass-specific methods with key value-coding when
the relationship is to the superclass? I have no problem executing
superclass-specific methods using valueForKeyPath
("part.partDescription"), but I want something along the lines of
valueForKeyPath("finished.unitQuantity") (unitQuantity is an
attribute of the Finished subclass of Part)
Am I simply missing something fundamental or is this a limitation of
key value-coding?
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden