Is there a logic behind the following?

I want the values of a custom property which is an array: to take a specific 
example the dropShow of button “button” and I want  the specific element color

Of course I can write: put the dropShadow of button “button” into aa; put  
aa[color]

Conveniently there is a shortcut : put the dropShadow[color] of button “button” 

(which I guess would need special coding because there isn’t a property whose 
name is "dropShadow[color]”; and this doesn’t work for DataGrids - but that’s 
another question)

Now I want to use variables so I can script for different properties

put “color” into pElementName; put “dropShadow” into pArrayName

1. This works:    put the dropShadow of button “button” into aa; put 
aa[pElementName]

2. And this works:    put the pArrayname of button “button” into aa; put 
aa[pElementName]

3. And (conveniently) this works:    put the dropShadow[pElementName] of button 
“button”

4. BUT (annoyingly) this fails, giving an empty result:     put the 
pArrayName[pElementName]  of button “button”

Why? If 3 works, I would have thought the parser would substitute values for 
all variables before getting the property using  the “special coding”

Neville
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to