[comp.sys.mac.hypercard] HC 2.0 palettes

hmarvel@hpuxa.ircc.ohio-state.edu (Howard P. Marvel) (08/08/90)

I have a series of stacks that use a common navigation panel.  This
would seem to be a good use for the palettes that are supposed to be
possible with 2.0.  Could some kind soul in the know answer the
following?

1.  I do not want users to have control over the visible of the
palette.  I do not want a window style that has a bar and a close box.
A plain window frame -- just a one pixel width rectangle frame.  Is
this possible?

2.  My palette will include a button to inform users when they have
departed from the main thread of the discussion.  The button, named
Main Line, is a picture of a railroad track.  It is highlighted when
the user has gone on a digression.  Therefore, I need to control the
hilite of this button separately from those of the other buttons in
the palette, each of which will be autohilite (or no hilite).  The
hilite of the main line button will depend on whether line one of a
global storing the return card stack (digressions can be nested) is
empty. Can this control of a single button be accomplished?

3.  When several stacks are visible at once, does a mouse click on a
palette make the stack with which the palette is associated active?
What if the palette is to be shared by some stacks (only one of which
is active at any given time) but not others (which can be active at
the same time as the stack to which the palette is to apply) and the
palette is somehow associated with the "start using.." stack used as a
library. Can this sort of arrangement work, or can multiple
(identical) palettes be kept around?

Thanks in advance.

Howard P. Marvel
Professor of Economics

stm@apple.com (Steve Maller) (09/07/90)

In article <3547@nisca.ircc.ohio-state.edu> 
hmarvel@hpuxa.ircc.ohio-state.edu (Howard P. Marvel) writes:
> I have a series of stacks that use a common navigation panel.  This
> would seem to be a good use for the palettes that are supposed to be
> possible with 2.0.

Everything you're asking about doing is possible with HyperCard 2.0, but 
you'll have to write your own XCMD to support the window to support your 
needed functionality. Out built-in XCMD doesn't handle other window types 
and it responds to all property sets and gets (visible among them). And 
palettes are not associated with a particular stack. They behave as the 
tool palette does. However, stacks are sent suspendStack and resumeStack 
messages. If your palette only works within a given stack, you can send it 
a message on suspendStack (and closeStack, of course) to go away or hide 
itself.

To summarize, the built in palette does some of what you want, but in 
order to make it fully custom, you'll have to write some C or Pascal 
code...

Steve Maller
HyperCard Engineering Team
Apple Computer