Checkboxes

Dar Scott dsc at swcp.com
Sat May 3 15:23:53 EDT 2014


I was thinking the use of the text property would have a teaching advantage.  Checkboxes could be used before properties are introduced.

The text property is special in that it can be used as the value of the object.  Most notably we can do this:

   put “All is good.” into field “Status”

We don’t have to write this:

   set the text of field “Status” to “All is good.”

So, I was thinking something like this:

   if button “Quiet” is not “checked” the…
   if button “option 4” is not “selected” then…

(And for the optional second phase allow ‘checkbox’ or ‘check box’ for the first one and ‘radio button’ for the second.)

I don’t mind using properties, but I just wanted to point out the advantage of text.

Now, all this use of text with buttons breaks down with the option menu.  It already uses text for the menu.  I would have preferred text be an alternate reference to the label.  So to set the menu we can do this:

   put optionList into me

Today we can say this:

  if the mouse is “down” then …

So, there is already a little bit of the same concept.

Of course, one can give students the function checkbox() to use until introducing properties.

An alternative would be to teach properties from the start and then show the text shortcuts.  

I don’t have any strong feelings about properties as an alternative, but it would be good to get away from highlight in teaching and in creating readable code.  Or maybe highlight can be introduced in some other way first.

Dar


On May 3, 2014, at 12:52 PM, Peter Bogdanoff <bogdanoff at me.com> wrote:

> So radio buttons would have the "pushed" property?
> 
> Peter
> 
> On May 3, 2014, at 11:48 AM, Richmond wrote:
> 
>> On 03/05/14 21:45, Dar Scott wrote:
>>> That reminds me…
>>> 
>>> What do folks think of making the text of a checkbox either “checked” or “unchecked” depending on the highlight?
>>> 
>>> So kids (and I) can write….
>>> 
>>> if button “multiplayer” is “checked” then
>>>>>> end if
>>> 
>>> What about allowing button mode in object references?  That might be harder.
>>> 
>>> If check box “multiplayer” is “unchecked” then
>>>>>> end if
>>> 
>>> Are these worth asking for?
>>> 
>>> Dar
>>> 
>>> 
>>> 
>> 
>> Why not keep things simple and have something like this? :
>> 
>> if the checked of btn "checkup" is true then
>> 
>> 'checked' seems to make perfect sense and it keeps the standard syntax for properties.
>> 
>> Certainly a lot more intuitive than 'hilite'; which, frankly makes me think of grey-haired ladies
>> going for a blue rinse . . . LOL
>> 
>> Richmond.
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list