I'm a little stumped at the moment... I saw an example of this a while back, but can't find it now. I'm trying to setup a color setting in the inputs. Jason suggested using eval() and gave an example of it in one post, but his example returns 0 (zero) - which is not a valid color.
How do I take a string ("black") and convert it to a color object "Color.black"??
I have tried joining two strings ("Color."+ncolor)
I have tried eval("Color."+ncolor) - which returns 0
I have tried eval(new String("Color."+ncolor)) - which returned a string (same as the first attempt).
The resulting error is...
Parameter Number 1 of Function setPriceBarColor is invalid.
Any help would be appreciated.
How do I take a string ("black") and convert it to a color object "Color.black"??
I have tried joining two strings ("Color."+ncolor)
I have tried eval("Color."+ncolor) - which returns 0
I have tried eval(new String("Color."+ncolor)) - which returned a string (same as the first attempt).
The resulting error is...
Parameter Number 1 of Function setPriceBarColor is invalid.
Any help would be appreciated.
Comment