How do I Create a Custom Property

David Burgun dburgun at dsl.pipex.com
Wed Apr 21 07:38:03 EDT 2004


Hi,

Thanks for this! I can't find any helpful information on this 
anywhere in the docs!

Ok, I have two places where I need to do something like this:

1.  I need to create a Custom Property and it to false regardless of 
whether it exists or not.

2.  I need to create a Custom Property and set it to ValueX ONLY if 
it doesn't already exist, if it does exist then I want it to be left 
untouched.

So for number 1, I just need to set the Custom Property, but for 
number 2, how can I tell if the Custom Property exists?

Also, what is the intended use of the "customKeys" and what does it 
actually save in "myCustomKeys" after executing this line:

   put the customKeys of this stack into myCustomKeys

Specifically, does it return a list/array or a string or what? How 
Can I appended to it and then set is back again using the following 
line:

    set the customKeys of this stack to myCustomKeys

Thanks for your help
Dave

>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
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list