How do I Create a Custom Property

Klaus Major klaus at major-k.de
Tue Apr 20 14:32:37 EDT 2004


Hi David,

> Hi,
>
> Could someone show me how to create a Custom Property from within a 
> Script as apposed to the IDE?
>
> I have the following code which doesn't work!!!
>
> on mouseUp
>   put the customKeys of this stack into myCustomKeys
>      if "CustomTest1" is not in myCustomKeys then
>     put "CustomTest1" after last item of  myCustomKeys
>     set the customKeys of this stack to myCustomKeys
>   end if
>
> set the "CustomTest1" of this stack to false
>   end mouseUp
>
> I want to create Custom Property called "CustomTest1" if it doesn't 
> exist.
> Whetherv "CustomTest1" exists or not, I want to set it to false.
>
> Could someone show me how to do this? I have been trying to make this 
> work for about 2 hours with no luck.

Do this:

> on mouseUp
>   put the customKeys of this stack into myCustomKeys
>      if "CustomTest1" is not in myCustomKeys then
>     set the CustomTest1 of this stack to empty
    ## will create an empty cp in case there isn't one...
    ## NO quotes!
>   end if
>   set the "CustomTest1" of this stack to false
>   end mouseUp
>
> Thanks in Advance

Hope that helps...

> Dave

Regards

Klaus Major
klaus at major-k.de
www.major-k.de



More information about the use-livecode mailing list