• 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
Re: Casting one Custom EO Class into Another...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Casting one Custom EO Class into Another...


  • Subject: Re: Casting one Custom EO Class into Another...
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 22 Dec 2004 17:24:57 -0800

You can't. They are different classes. You can't just cast them. It is not legal (or sensible) in either Java or EOF. The word you are looking for is copy. You want to copy the data from one to another. You can do it manually, as someone else posted, or your can modify the copying code in Practical WebObjects. For this one off, i'd just do it manually.

Chuck


On Dec 22, 2004, at 1:53 PM, Clint Fleetwood wrote:

I need to cast say InventoryMaster class (a custom EO class from the eomodel, table called InventoryMaster) into another class called eCommerceBucket (another custom EO class from the eomodel) in order to save the data from InventoryMaster to eCommerceBucket...The two tables contain the EXACT SAME database structure (same attributes and fields and everything), the eCommerceBucket is a temporary store to hold some temporary data before passing it off to another company to be used for an online website. I am putting the results from a fetchSpec called against InventoryMaster into an NSMutableArray and I need to put that data into eCommerceBucket but it complains that it can't because the datatype is of type InventoryMaster and NOT eCommerceBucket.

Can Somebody please help....VERY DESPERATE.....THANKS A MILLION !!

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net


This email sent to email@hidden

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects




_______________________________________________
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


References: 
 >Casting one Custom EO Class into Another... (From: Clint Fleetwood <email@hidden>)

  • Prev by Date: Re: [SOLVED] dev runs fine - server gives errors
  • Next by Date: [ANN] Alternative object serialization
  • Previous by thread: Re: Casting one Custom EO Class into Another...
  • Next by thread: [ANN] Alternative object serialization
  • Index(es):
    • Date
    • Thread