• 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: EO Constructor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EO Constructor


  • Subject: Re: EO Constructor
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 11 Nov 2009 17:44:07 -0800


On Nov 11, 2009, at 5:38 PM, Tavis McDevitt wrote:


I'm reading Marker's "WebObjects 5 for Mac OS X." He details a method of providing default values for a component's form: he sets an EO's attributes in it's constructor. Then the bindings to those attributes cause the form displayed to the user to have default values. He does this because the EO has not been inserted into the EC yet and so awakeFromInsertion has not been called.

Shriek!!! Shriek!!! Shriek!!!

JPEG image






I am of the understanding that only non attribute (temporary) variables can be safely initialized in the constructor. What is a better way to provide default values on a form bound to a new EO?


There is only one way to safely and correctly supply default faults: use awakeFromInsertion. And EO not in an EC is a disaster waiting to happen.



Chuck


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific 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

  • Follow-Ups:
    • Re: EO Constructor
      • From: David LeBer <email@hidden>
References: 
 >EO Constructor (From: Tavis McDevitt <email@hidden>)

  • Prev by Date: EO Constructor
  • Next by Date: Re: new EOObjectStoreCoordinator and closing database connection afterwards
  • Previous by thread: EO Constructor
  • Next by thread: Re: EO Constructor
  • Index(es):
    • Date
    • Thread