Custom Properties and Syntax Question

Klaus Major klaus at major-k.de
Wed Apr 7 05:56:34 EDT 2004


Hi David,

> Hi,
>
> I'm having a problem address Custom Properties. I have the following 
> script on a Text Field:
> ...
> Which works fine, however I would like to make it more flexible and do 
> something like:
>
> on closeField
> if the text of field me is > cMaxValue then
>   put cMaxValue  into field the FieldPageNumber
>   beep
> end if
>
> (Where cMaxValue is a Custom Property of the current Field)
> But I get Errors, so my question is, how to I address CustomProperties 
> and how do I address the current field?

Do this:

on closeField
    if  me > the cMaxValue of me then
        put the cMaxValue of me into field the FieldPageNumber
        beep
    end if
end closefield

Note the shortcut "me", which resolves to the content of that field 
(Hey, it's me! ;-)
and "the cMaxValue of me" since the field is the "owner" of that 
customprop...

Customprops always have to be referred to with:

THE name_of_cp OF name_of_owner


Hope that helps...

> Thanks a lot
> Dave

Regards

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



More information about the use-livecode mailing list