HyperCard: Handler for Selecting Groups of Cards (7/92)

This handler adds the current card to the list of selected cards. After
you've selected a group of cards, you can perform operations on all of them
using doToSelectedCards.

on selectCard clearSelection
-- Group selection of cards.
-- This handler adds the current card to the currently
-- selected cards or clears the list of currently selected cards:

global selectedCards
if clearSelection is not empty then
put empty into selectedCards
put "No cards selected."
else
get long id of this card
if it is in selectedCards
then put word 1 to 3 of it & " is already selected."
else
put it & return after selectedCards
put word 1 to 3 of it & " is now selected."
end if
end if
end selectCard


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012