[comp.sys.mac.hypercard] What comes first the buttons or fields?

jacob@latcs2.lat.oz.au (Jacob L. Cybulski) (05/01/91)

I am writing an application which in response to user actions
constructs the graphics with a lot of buttons and fields for each card.
To avoid the screen flicker during mode switching and screen locking
(both operations are very slow), I generate all the necessary buttons
and fields at the creation of the card and add more or reclaim some
when appropriate. I have some problems though :-

	having an list of free buttons and fields (or their ids),
	I have no way assessing which buttons precede which fields
	(or vice-versa). 

It seems that the numbering scheme for buttons and fields is quite
separate. If I decide to use menu "Bring Closer" and "Send Farther",
it defeats the whole idea of piggybanking to increase the efficiency
(they are very slow again). 

How can I compare the relative position of buttons and fields, or
force them to assume a particular position without a menu call.
Perhaps there is an alternative way to efficeintly generate buttons
and fields fast?

Any comments?

Jacob

niski@reed.edu (05/11/91)

In article <1991May1.025303.16314@latcs2.lat.oz.au> jacob@latcs2.lat.oz.au (Jacob L. Cybulski) writes:
>I am writing an application which in response to user actions
>constructs the graphics with a lot of buttons and fields for each card.

[deletions...]

>How can I compare the relative position of buttons and fields, or
>force them to assume a particular position without a menu call.
>Perhaps there is an alternative way to efficeintly generate buttons
>and fields fast?


One thing i've done is to create template cards that the user doesn't access
by browsing the stack; it's often much faster to trap the "newCard" message,
and copy the template card you want into the right spot in the stack;
then you can empty fields, or delete buttons, etc.  In my not-so-extensive
experience, if you have more than 8 buttons & 8 to 10 fields, this is faster 
than waiting for all those "new button" messages to execute.

re: numbering items - if you have a bunch of buttons and delete one or two
i think the numbering adjusts.
-------------------------------------------------------------------------------
Joe Niski						niski@reed.edu
Mac Support Coordinator
Reed College, Portland, OR 97202			503-777-7525