3) Validate the value and it it's an undesired value,
throw an error ? Here, the component prevents the user
from assigning and undesired value like NaN or
undefined and the user is alerted of the failure at
runtime provided that he used a try catch statement.
What do you guys think ?
(3)
so if it's a bad input, it cannot tell the object
that is modifying the setter property that something went wrong.
Not sure if it's the best practice, but if someone passes in a bad input to
your setter, in AS3 you can throw errors, such as:
public function set volume( val:Number ) {
if (
Not sure if it's the best practice, but if someone passes in a bad input to
your setter, in AS3 you can throw errors, such as:
You can do the same thing in AS2, of course...
Jim Kremens
On 9/25/06, slangeberg [EMAIL PROTECTED] wrote:
so if it's a bad input, it cannot tell the object
that is
3 matches
Mail list logo