dsc at swcp.com
Sat May 3 16:27:54 EDT 2014
I’m sorry, I wasn’t meaning to say a property is the same as system state (though the distinction between built-in functions and read-only global functions is blurred). I was meaning that the use of strings to represent state values has precedence. We are not limited to true and false.
I don’t think the parser has to get involved. I don’t think it would need to parse any differently or even compile.
This would just mean using the text property in some buttons. Fields, images, and buttons have the text property. The text property is ignored in buttons that are not menus. Why not make ti do something?
If people use the text property of buttons (not used as menus) as a flexible way to have a property, then this might break, but that should be rare.
That is, I can say this now:
put “unchecked" into button “Sound”
and it will save it away, but it doesn’t change the highlight. I’m just suggesting it could.
I suppose an advantage of keeping it like it is is that one can change the mode of a button and change it back without the value of the text property being changed.
But if people prefer this:
put true into the checked of button “Sound”
I will go with that, but it would change the order of what I teach.
On May 3, 2014, at 1:59 PM, Mark Wieder <mwieder at ahsoftware.net> wrote:
> Saturday, May 3, 2014, 12:23:53 PM, you wrote:
>> Today we can say this:
>> if the mouse is down then
> That's a different kind of thing. "the mouse" is a state, not a
> control. As a state it can have one of two current conditions. By
> asking what the mouse "is" you are querying its current condition, but
> by asking the same thing of a control (a button, etc) you are not
> explicitly asking for the state of one of its properties, but rather
> querying the control object itself:
> if button "Quiet" -- references an object
> if the mouse -- references the mouse state
> mapping the checked/unchecked state of a checkbox button onto the
> object reference requires a whole new level of metaprogramming and
> parser inference.
> -Mark Wieder
> ahsoftware at gmail.com
> This communication may be unlawfully collected and stored by the National
> Security Agency (NSA) in secret. The parties to this email do not
> consent to the retrieving or storing of this communication and any
> related metadata, as well as printing, copying, re-transmitting,
> disseminating, or otherwise using it. If you believe you have received
> this communication in error, please delete it immediately.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode