getProp syntax query

Graham Samuel livfoss at mac.com
Mon Apr 2 15:59:16 EDT 2012


Mark, thanks for that. There is absolutely nothing of this in the LC Dictionary AFAICS, although after a search I realised that there is a very hard to read (IMHO) description on section 7.10 of the User Guide. I think at the very least a note should be added to the Dictionary entry, so I have submitted one, but I would be very happy if someone such as yourself corrects it. It seems a huge omission to me. The Dictionary should give at least the correct syntax for every type of statement.

Thanks again

Graham

On Mon, 2 Apr 2012 13:38:06 +0200, Mark Schonewille <m.schonewille at economy-x-talk.com> wrote:

> Hi Graham,
> 
> The following (nonsense) example works:
> 
> getProp foo[bar]
>   answer bar
>   return "hello world"
> end foo
> 
> setProp foo[bar] theData
>   answer theData
>   pass foo
> end foo
> 
> You can use only one index, i.e. the setProp/getProp handlers are one-dimensional. An additional parameter contains the data that the property is being set to. Use the target to find out which control's property is being set. 
> 
> --
> Best regards,
> 
> Mark Schonewille




More information about the use-livecode mailing list