Try throwing an error in the constructor

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
rss181919
Sent: Monday, September 08, 2008 8:02 AM
To: [email protected]
Subject: [flexcoders] How to terminate construction


I'm new to flex and just getting my feet wet with AS3. Today's
questions are:

"How do I force a constuction request to fail?"
"How do I make a property value required for construction?"

For example, if I have a construction argument that must meet a certain
standard and this standard is not enforced automatically in the type
declaration, how do I prevent the object from being created if the
standard is not met.

I assume a setter / getter combination could be applied if the standard
is based specifically on the value of a property. But even here, I
don't know how to force the property to be a requirement for object
creation.

Reply via email to