Re: EO Constructor
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!!!
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