HyperCard Mailing List

[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 1 of 16)
andrewferguson500@[redacted].com <andrewferguson500@[redacted].com>
Thursday, 16-Jan-2014 13:31 GMT
Hello everyone,
I was wondering if anyone could tell me how radio buttons and checkboxes work in HyperCard, if possible HyperCard 2.2 (If there were any differences between versions).


In LiveCode, checkboxes are automatically highlighted when you click them, as are radio buttons. Is this the same as HyperCard? Also in LiveCode, you can group radio buttons together and the highlight will move between them when you click another one. Did HyperCard have anything similar to this or did this have to be coded by hand?


Thanks,
Andrew
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 2 of 16)
Mark Schonewille <m.schonewille@[redacted].com>
Thursday, 16-Jan-2014 13:43 GMT
Hi Andrew,

If the autoHilite of checkboxes is set to true, they will change
automatically. If not, you can also use a script:

on mouseUp
set the hilite of me to not the hilite of me
if the hilite of me then
-- do something
else
-- do something else
end if
end mouseUp

This is basically all there is to checkboxes.

Radio buttons are part of a family. You can change the family if you
double-click on a radio button or choose Button Info from the menubar.
You might have to click on another button in the dialog that appears or
you can just enter the family number somewhere.

Radio buttons with equal family numbers will dehilite if one of them is
clicked. Subsequently, the clicked button will be hilited. Again, for
this the autoHilite of the buttons needs to be set to true. If not, you
can do something like this:

on mouseUp
put "1014,1015,1016,1017" into buttonList
repeat with x = 1 to number of items of buttonList
set the hilite of cd button id buttonList to false
end repeat
set the hilite of me to true
end mouseUp

I just hope I didn's make any mistakes, as I don't write scripts for
HyperCard very often these days.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 1/16/2014 14:31, andrewferguson500@[redacted].comwrote:
>
>
> Hello everyone,
>
> I was wondering if anyone could tell me how radio buttons and checkboxes
> work in HyperCard, if possible HyperCard 2.2 (If there were any
> differences between versions).
>
> In LiveCode, checkboxes are automatically highlighted when you click
> them, as are radio buttons. Is this the same as HyperCard? Also in
> LiveCode, you can group radio buttons together and the highlight will
> move between them when you click another one. Did HyperCard have
> anything similar to this or did this have to be coded by hand?
>
> Thanks,
> Andrew
>
>
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 3 of 16)
Arthur Evans Jr <evanssl21@[redacted].net>
Thursday, 16-Jan-2014 14:19 GMT
In Hypercard, neither a checkbox nor a radio button automatically
changes it hilite status when you click on it. However, in the button
dialog check "auto hilite' and they will automatically change
highlight status when clicked on.

You can group radio and checkbox buttons buttons so that clicking on
any one in the group automatically un-hilites the others. HC supports
15 families. In the dialog box there's a drop-down field 'Family'
into which you can store a number from 1 to 15. Then all buttons in
that family have the property that clicking on any one of them
hilites that button and un-hilites the others.

Interestingly, until I just researched this I didn't realize that
checkboxes work this way. I make lots of use of radio button families.

Here I thought I was the only human being left on the planet actively
programming in HC! I was glad to read your note.

Art Evans

At 05:31 -0800 2014.01.16, <andrewferguson500@[redacted].com wrote:
>
>
>Hello everyone,
>
>I was wondering if anyone could tell me how radio buttons and
>checkboxes work in HyperCard, if possible HyperCard 2.2 (If there
>were any differences between versions).
>
>In LiveCode, checkboxes are automatically highlighted when you click
>them, as are radio buttons. Is this the same as HyperCard? Also in
>LiveCode, you can group radio buttons together and the highlight
>will move between them when you click another one. Did HyperCard
>have anything similar to this or did this have to be coded by hand?
>
>Thanks,
>Andrew
>
>
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 4 of 16)
andrewferguson500@[redacted].com <andrewferguson500@[redacted].com>
Thursday, 16-Jan-2014 16:39 GMT
Thanks everyone.


I have a few more questions.
Do you know if you are able to use the "family" on other styles of buttons?
Does the family work on multiple cards?
Can you change the family of a button through a script?


Thanks again,
Andrew
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 5 of 16)
Craig Newman <DunbarX@[redacted].com>
Thursday, 16-Jan-2014 16:57 GMT
I still program in HC all the time. LC for everything possible, though.

Craig Newman.

Sent from my iPhone

> On Jan 16, 2014, at 8:19 AM, Arthur Evans Jr <evanssl21@[redacted].net wrote:
>
> In Hypercard, neither a checkbox nor a radio button automatically changes it hilite status when you click on it. However, in the button dialog check "auto hilite' and they will automatically change highlight status when clicked on.
>
> You can group radio and checkbox buttons buttons so that clicking on any one in the group automatically un-hilites the others. HC supports 15 families. In the dialog box there's a drop-down field 'Family' into which you can store a number from 1 to 15. Then all buttons in that family have the property that clicking on any one of them hilites that button and un-hilites the others.
>
> Interestingly, until I just researched this I didn't realize that checkboxes work this way. I make lots of use of radio button families.
>
> Here I thought I was the only human being left on the planet actively programming in HC! I was glad to read your note.
>
> Art Evans
>
> At 05:31 -0800 2014.01.16, <andrewferguson500@[redacted].com wrote:
>> Hello everyone,
>> I was wondering if anyone could tell me how radio buttons and checkboxes work in HyperCard, if possible HyperCard 2.2 (If there were any differences between versions).
>> In LiveCode, checkboxes are automatically highlighted when you click them, as are radio buttons. Is this the same as HyperCard? Also in LiveCode, you can group radio buttons together and the highlight will move between them when you click another one. Did HyperCard have anything similar to this or did this have to be coded by hand?
>> Thanks,
>> Andrew
>
>
>
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 6 of 16)
Craig Newman <DunbarX@[redacted].com>
Thursday, 16-Jan-2014 16:59 GMT
I think the family property can be applied to other button styles without error but will have no effect.
Been a long time since the last HC coding post.
Craig

Sent from my iPhone

> On Jan 16, 2014, at 10:39 AM, <andrewferguson500@[redacted].com wrote:
>
> Thanks everyone.
>
>
>
> I have a few more questions.
>
> Do you know if you are able to use the "family" on other styles of buttons?
>
> Does the family work on multiple cards?
>
> Can you change the family of a button through a script?
>
>
>
> Thanks again,
>
> Andrew
>
>
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 7 of 16)
Ted Howard <tedchoward@[redacted].com>
Thursday, 16-Jan-2014 17:07 GMT
I seem to remember that the family worked on all button styles, but it's
been a while.

On Thursday, January 16, 2014, Craig Newman <DunbarX@[redacted].com wrote:

>
>
> I think the family property can be applied to other button styles without
> error but will have no effect.
> Been a long time since the last HC coding post.
> Craig
>
> Sent from my iPhone
>
> On Jan 16, 2014, at 10:39 AM, <andrewferguson500@gmail.com<javascript:_e({}, 'cvml', 'andrewferguson500@gmail.com');>>
> wrote:
>
>
>
> Thanks everyone.
>
>
> I have a few more questions.
>
> Do you know if you are able to use the "family" on other styles of
> buttons?
>
>
> Does the family work on multiple cards?
>
> Can you change the family of a button through a script?
>
>
> Thanks again,
>
> Andrew
>
>
>


--
Ted C. Howard
http://tedchoward.com
http://twitter.com/tedchoward
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 8 of 16)
Arthur Evans Jr <evanssl21@[redacted].net>
Thursday, 16-Jan-2014 22:46 GMT
>Do you know if you are able to use the "family" on other styles of buttons?

I tried it adding an "ordinary" button to the family, and yes, it
does participate in that family. I have no idea why that "feature"
might be useful.

I tried it with a popup button, but it doesn't participate. Again,
why might it be useful?

>Does the family work on multiple cards?

I set up 2 cards on a background with 2 background buttons with the
same family. Poking a button one 1 card changes the other. Curious...

>Can you change the family of a button through a script?

Yes.
set the family of button "FOO" to 6
The family property applies to only buttons.

Art Evans
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 9 of 16)
Craig Newman <DunbarX@[redacted].com>
Thursday, 16-Jan-2014 23:05 GMT
A background button will show the same state on different cards depending on the sharedhilite property. This allows a family of buttons to have either different or the same patterns on multiple cards

Craig

Sent from my iPhone

> On Jan 16, 2014, at 4:46 PM, Arthur Evans Jr <evanssl21@[redacted].net wrote:
>
> >Do you know if you are able to use the "family" on other styles of buttons?
>
> I tried it adding an "ordinary" button to the family, and yes, it
> does participate in that family. I have no idea why that "feature"
> might be useful.
>
> I tried it with a popup button, but it doesn't participate. Again,
> why might it be useful?
>
> >Does the family work on multiple cards?
>
> I set up 2 cards on a background with 2 background buttons with the
> same family. Poking a button one 1 card changes the other. Curious...
>
> >Can you change the family of a button through a script?
>
> Yes.
> set the family of button "FOO" to 6
> The family property applies to only buttons.
>
> Art Evans
>
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 10 of 16)
Uli Kusterer <Witness.of.TeachText@[redacted].net>
Friday, 17-Jan-2014 01:38 GMT
On 16 Jan 2014, at 23:46, Arthur Evans Jr <evanssl21@[redacted].net wrote:
>> Do you know if you are able to use the "family" on other styles of buttons?
>
> I tried it adding an "ordinary" button to the family, and yes, it
> does participate in that family. I have no idea why that "feature"
> might be useful.

Its useful for things like the view mode switch in Finder, or the
text alignment icons in TextEdits ruler. You can create three but
tons, one for left, center and right, make them auto-highlight in the same family.

> I tried it with a popup button, but it doesn't participate. Again,
> why might it be useful?

IIRC popup buttons in general dont have a highlight. They only indicate
that theyre clicked (which is often, but not always the same as the hig
hlight. E.g. click on a checkbox: It uses a thicker outline to indicate mouse tracking, and the highlight controls the checked/unchecked state)

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://zathras.de



[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 11 of 16)
Uli Kusterer <Witness.of.TeachText@[redacted].net>
Friday, 17-Jan-2014 01:49 GMT
On 17 Jan 2014, at 00:05, Craig Newman <DunbarX@[redacted].com wrote:
> A background button will show the same state on different cards dependingon the sharedhilite property. This allows a family of buttons to have either different or the same patterns on multiple cards

A leak! A leak!

1) HyperCard doesnt really distinguish between buttons and text fields i
nternally. In the file format they are the same thing. Its only the draw
ing code and how you address them in the scripting language that makes the distinction.

2) Field contents are stored separately from the rest of the field properties. This is useful, because the field is stored on the background, while the contents are stored on the card, and just mention that they are for "bg part id 5.

3) In HyperCard 2.1 and earlier, buttons had no contents as far as we userswere concerned. But since theres no difference between buttons and fiel
ds, the contents for card buttons were used to hold a 1 or a 0
to indicate the button highlight of background buttons which didnt have
the sharedHighlight on.

4) #3 is the reason why button contents (which were introduced with HyperCard 2.2, together with popup buttons) are always shared for background buttons. There is no sharedText = false for buttons, because then where would
they put the button highlight?

And thats it for today from the ministry of woolen underwear, department
of useless knowledge.

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://zathras.de



[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 12 of 16)
andrewferguson500@[redacted].com <andrewferguson500@[redacted].com>
Friday, 17-Jan-2014 13:12 GMT
>The family property applies to only buttons.


Strange, I have just checked inside one of my HyperTalk books, Hyper Dictionary by Philip Brown, and there is no mention of the family property.


Hyper Dictionary was published in 1988. Was the family property only added to later versions of HyperCard? Or is my book wrong? (It seems to have a few mistakes).


And that brings me on to another question.
In the same book, there is a list of all the styles that can be used on a button. It lists round rect, check box and radio button, to name a few. However, when I try using these in HyperCard, it only accepts roundRect, checkbox, radioButton.


Is this a feature that was changed in later versions of HyperCard? Or is my book incorrect?


Thanks,
Andrew
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 13 of 16)
Craig Newman <DunbarX@[redacted].com>
Friday, 17-Jan-2014 14:19 GMT
HC was first introduced in1987. That means you have info on version 1x. Version 2x is much more powerful and has many more language elements. Get either Dan Goodmans 2.2 handbook or Winkler, Kamins and deVoto's HyperTalk 2.2.

Sent from my iPhone

> On Jan 17, 2014, at 7:12 AM, <andrewferguson500@[redacted].com wrote:
>
> >The family property applies to only buttons.
>
>
>
> Strange, I have just checked inside one of my HyperTalk books, Hyper Dictionary by Philip Brown, and there is no mention of the family property.
>
>
>
> Hyper Dictionary was published in 1988. Was the family property only added to later versions of HyperCard? Or is my book wrong? (It seems to have a few mistakes).
>
>
>
> And that brings me on to another question.
>
> In the same book, there is a list of all the styles that can be used on a button. It lists round rect, check box and radio button, to name a few. However, when I try using these in HyperCard, it only accepts roundRect, checkbox, radioButton.
>
>
>
> Is this a feature that was changed in later versions of HyperCard? Or is my book incorrect?
>
>
>
> Thanks,
>
> Andrew
>
>
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 14 of 16)
Uli Kusterer <Witness.of.TeachText@[redacted].net>
Friday, 17-Jan-2014 14:39 GMT
On 17 Jan 2014, at 14:12, andrewferguson500@[redacted].comwrote:
> >The family property applies to only buttons.

> Strange, I have just checked inside one of my HyperTalk books, Hyper Dictionary by Philip Brown, and there is no mention of the family property.

I think the family was also new with 2.2. Might have been in 2.1 already, not 100% sure. HyperCard 2.0 came out in 1989, so it's no surprise that your book doesn't have those features. 2.0 was a rather significant change (adding support for creating your own menus etc.)

You may be better off looking up stuff in the HyperTalk reference. There's a (slightly rough) PDF of it up at http://hypercard.org
> In the same book, there is a list of all the styles that can be used on a button. It lists round rect, check box and radio button, to name a few. However, when I try using these in HyperCard, it only accepts roundRect, checkbox, radioButton.
>
The menu item names are with the space, the actual properties don't have the space in the name.

-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 15 of 16)
Arthur Evans Jr <evanssl21@[redacted].net>
Friday, 17-Jan-2014 16:46 GMT
Every thing I have claimed in this thread was tested using Hypercard
2.4.1. It runs under SheepShaver using Mac OS 8.5, and SheepShaver
runs on my iMac using 10.6.8 (Snow Leopard).

I acquired this version of HC in December 1998 on the CD that came
from Apple with Mac OS 8.5. I still have that CD, and it was valuable
in installing SheepShaver.

I use HC actively for maintenance and improvement of several stacks.

>Hyper Dictionary was published in 1988. Was the family property only
>added to later versions of HyperCard? Or is my book wrong? (It seems
>to have a few mistakes).

Your book is old. Most or all of new versions of HC had new features.

>And that brings me on to another question.
>
>In the same book, there is a list of all the styles that can be used
>on a button. It lists round rect, check box and radio button, to
>name a few. However, when I try using these in HyperCard, it only
>accepts roundRect, checkbox, radioButton.

Look at the Get Info box for HyperCard to find the version you are
using. Also, the Home stack has a copyright notice with a date.

>Is this a feature that was changed in later versions of HyperCard?
>Or is my book incorrect?

Yes to your first question, and your book is probably obsolete rather
than being originally incorrect. The Apple documents that I have on
my shelf and consult from time to time are for HC 2.3.1. My 2.4.1 has
features that are missing from my books.

Art Evans
[HC] Radio buttons and checkboxes in HyperCard (2.2)
(Msg 16 of 16)
andrewferguson500@[redacted].com <andrewferguson500@[redacted].com>
Friday, 17-Jan-2014 18:24 GMT
>Get either Dan Goodmans 2.2 handbook or Winkler, Kamins and deVoto's HyperTalk 2.2.


I actually have HyperTalk 2.2 The Book. I have just dug it out and the family property was new in HyperTalk 2.2.


Although the book is good, I spend a lot of time looking through the index to find what I need. It is also a pain carrying it around. Does anyone happen to have a PDF of the book? Or a PDF of any similar books (Books that are on HyperTalk 2.2)?


Thanks,
Andrew
HyperCard® and HyperTalk™ remain trademarks of Apple, Inc.; other trademarked products and terms mentioned in this archive are the property of their respective trademark holders. Individual messages remain the intellectual property of their respective authors.