creating a new object with a decendant class from EOGenericRecord
creating a new object with a decendant class from EOGenericRecord
- Subject: creating a new object with a decendant class from EOGenericRecord
- From: John Spicer <email@hidden>
- Date: Thu, 6 Jan 2005 13:23:33 -0600
I have created an EOModler class and given it a name (MTSubscriber). I've created the class file for it and added it to the project.
I need to create one in the code. I'm trying this:
MTSubscriber
user = (MTSubscriber) new MTSubscriber();
this compiles and runs, but when I get to that line the app goes in the tank.
I've also tried this but I get a class cast exception at run time (make sense, since user is declared as MTSubscriber instead of EOGenericRecord):
subscriberDescription = EOClassDescription.classDescriptionForEntityName("MTSubscriber");
user = (MTSubscriber) new EOGenericRecord (subscriberDescription);
I'm trying to model it after chapter 10 of the Web Applications book (page 150-151).
I know I'm missing something basic here. Sorry I have to ask. _______________________________________________
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