Passing Constants or Variables as Command Params

J. Landman Gay jacque at hyperactivesw.com
Fri Oct 14 01:35:14 EDT 2016


On 10/13/16 9:56 PM, Sannyasin Brahmanathaswami wrote:
> But when passed as a param the gradient ramp gets (where start defaults to kPureWhite)
>
> setRamp "","","",sSoftRed,"","" # this also fails
>
> # we see this:
> 0.00000,255,255,255,255
> 1.00000,sSoftRed,255
>
> # or
>
> 0.00000,255,255,255,255
> 1.00000,kSoftRed,255
>
> # if I try to pass the param as a constant
>
> and errors out with "bad gradient ramp" because the literal string value of the name of the variable or constant is passed and not the value it contains.

It should work. The only thing I can think of is if you've declared the 
same variable name in the script containing the ramp handler. LC may be 
using the wrong variable, and a variable without a value will return its 
own name.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list