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!!!
<<inline: homer_the_scream1.jpg>>
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 DevelopmentPractical 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 protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
