query if properties value index is valid
Posted: September 29th, 2004, 12:57 pm
Hello,
I was wondering what my best way to check if a property has a valid
value attribute. I'm looping through Effects and properties and when
I come to some of them my script breaks ie:
var assemble = currentLayer("Effects")("Basic Text").fillAndStroke.value;
I get an invalid object error..
where if I querry it with another index ie:
var assemble = currentLayer("Effects")("Basic Text").fillAndStroke.unitsText;
I get my value I'm looking for. Sooo I know it's there and it's valid
so is there a way for me to query before assigning to make sure it's
valid.. also you'll have to excuse my javascript ignorance but is
there a way to handle an exception like a try{}catch{} type system
that could get me where I need to go??
thanks,
jdietz
I was wondering what my best way to check if a property has a valid
value attribute. I'm looping through Effects and properties and when
I come to some of them my script breaks ie:
var assemble = currentLayer("Effects")("Basic Text").fillAndStroke.value;
I get an invalid object error..
where if I querry it with another index ie:
var assemble = currentLayer("Effects")("Basic Text").fillAndStroke.unitsText;
I get my value I'm looking for. Sooo I know it's there and it's valid
so is there a way for me to query before assigning to make sure it's
valid.. also you'll have to excuse my javascript ignorance but is
there a way to handle an exception like a try{}catch{} type system
that could get me where I need to go??
thanks,
jdietz