I've been reading and learning about OO design
analysis for the past few months and I've just
recently started applying what I've learned in my
Flash projects ?
Learning a new language (like AS3) is no biggie but
learning how to code differently (from procedural to
OOP) is the real challenge for
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
4 matches
Mail list logo