How do I use customProperties

Klaus Major k_major at
Tue Feb 11 12:31:01 CST 2003

Hi Graham,

> I seem to be forever stuck in a half-understanding of Transcript/Revo. 
> The latest problem is that I want to do an existence test for a 
> particular custom property. I already know I can't script
>   if exists(the myOddProperty of image "thing" of this cd) then...
> as someone has already explained to me that a property is not an 
> object, and so in this rather technical sense doesn't exist. My next 
> attempt was to
>  get the customProperties of image "thing" of this cd
>  if "myOddProperty" is in it then...
> This doesn't work either, presumably because the customProperties is 
> an array, although you would have thought that the indices of an array 
> (element references) would be in there somewhere. There is not that 
> much about arrays in the documentation (the entry under ']' in the 
> Transcript Dictionary is quite useful, but it took some finding).
> I then tried
>  get the customProperties of image "thing" of this cd
>  if exists(it["myOddProperty"]) then...
> But that doesn't work either (I suppose an array element isn't an 
> object).
> I'm sure the answer is simple, but I can't find it. Help appreciated.
> Graham

"customkeys" is the magic word :-)

   if (lineoffset("myOddProperty",the customkeys of img "thing") <> 0) 
    ## do your stuff here
   end if

Hope that helps.


Klaus Major
k_major at

More information about the use-livecode mailing list