[TAO] value() to obtain pointer functionality

Kay C Lan lan.kc.macmail at gmail.com
Sat Aug 2 21:18:08 EDT 2014


On Sun, Aug 3, 2014 at 8:00 AM, Richard Gaskin
<ambassador at fourthworld.com> wrote:
>> set the (<any expression here>) of button "xyz" to 10

I looked at this again and thought maybe the problem you're having is
because you're setting numbers and I'm generally using true and false,
although I'm sure I've set text and numbers on many many occassions,
but I just did a quick check by changing true and false to 1 and 0 and
it still works fine:

on menuPick pItemName
  if (the cScriptRunning of me is 0) then
    set the cScriptRunning of me to 1

    --do all you need to do here

  set the cScriptRunning of me to 0
  end if
end menuPick

set the cScriptRunning of btn "Choices" to 1
set the menuHistory of btn "Choices" to 26
set the cScriptRunning of btn "Choices" to 0

There must be something about your set up that is causing this because
the examples in the User Guide include:

set the loc of button "OK" to 32,104 --page 207
set the myCustomProperty of button 1 to false --page 223
set the customKeys of button "My Button" to it --page 227
set the customPropertySet of button 3 to "Spanish" --page 228
set the myCustomProp of button 1 to true --page 230

So when you say <any expression here> do you mean any, as in custom
properties and inbuilt properties, or is it specifically with custom
properties and does it make a difference if the values is a number,
text or Boolean?




More information about the use-livecode mailing list