• 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
creating a new object with a decendant class from EOGenericRecord
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: creating a new object with a decendant class from EOGenericRecord
      • From: Chuck Hill <email@hidden>
    • Re: creating a new object with a decendant class from EOGenericRecord
      • From: "Arturo Perez" <email@hidden>
  • Prev by Date: Re: WO/Javascript
  • Next by Date: Re: creating a new object with a decendant class from EOGenericRecord
  • Previous by thread: Help with StackOverflowError
  • Next by thread: Re: creating a new object with a decendant class from EOGenericRecord
  • Index(es):
    • Date
    • Thread