Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!agate!ucbvax!mtxinu!sybase!mercury!eallen From: eallen@mercury.sybase.com (Ed Allen) Newsgroups: comp.sys.mac.hypercard Subject: Re: Simulating arrays (Of tickboxes) Message-ID: <12659@sybase.sybase.com> Date: 10 May 91 05:05:08 GMT References: <9105070137.AA07503@cs.utexas.edu> Sender: news@Sybase.COM Reply-To: eallen@mercury.UUCP (Ed Allen) Organization: Sybase, Inc. Lines: 32 One way to get such an array economically is to design a custom font that has one character for the checked box and one for the unchecked box. The array is a field that you fill with one of the two characters and the field has a mouseup script that catches which character you clicked on and sets it to the opposite character. Your database function scripts assess the same character in the background field on each card for each badge. Since as far as HyperCard is concerned, you are only storing characters in one or a few bg fields and not hundreds of card buttons per card, it is much smaller in disk space and will perform much quicker. You have to have the assignment of character array elements designed into your scripts so that you know that char 7 of line 6 of fld "badges" means "FISHING" or whatever. You'll need to use resedit or Fontastic + or something similar to make the dedicated font. A couple of caveats: large pictographic fonts will sometimes default to geneva in low memory conditions at about the same time as you lose the use of paint tools, and while we have been installing custom fonts in stacks for awhile, Apple DTS says this is a no-no and will break in System 7 and could cause potential problems with font number conflicts even without Sys 7. Other maladies have been warned about, but it's usually worked out okay for most scripters to attach thaeir fonts to their stacks so far. To be completely safe from such problems ( but less convenient and portable) install the custom font in your system normally or via Suitcase instead of the stack. I have an incomplete game stack that I did with such a font to represent map spaces and pieces, which has the scripts in it that deal with moving the player's piece around on the map and testing to see what he lands on, never took it any farther. If you need such to help, I can probably dig it out and send it to you as an example. Ed Allen eallen@sybase.com