Path: utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!wuarchive!cec2!news From: jtw@wuee1.wustl.edu (Trent Wohlschlaeger) Newsgroups: comp.sys.mac.hypercard Subject: Re: Hierarchical stack buttons Message-ID: <1990Feb14.201906.26724@cec1.wustl.edu> Date: 14 Feb 90 20:19:06 GMT References: <529@opus.NMSU.EDU> Sender: news@cec2 (USENET News System) Reply-To: jtw@wuee1.wustl.edu (Trent Wohlschlaeger) Distribution: na Organization: Washington University, St. Louis MO Lines: 41 In article <529@opus.NMSU.EDU> lrasmuss@nmsu.edu (Linda Rasmussen) writes: > >Does anyone know of an easy way to create UP and NEXT buttons in a very large >hierarchical stack? It looks something like this: > > a a a > b b b b b b > c c c c c c c c c c c c c c c c c c > >There are at least a hundred "a" cards; what we need is for UP arrow >buttons to go up to the parent "b" if they are a "c", or up to the I did this a while ago. I ended up creating a bg named "a", a bg named "b", and a bg named "c". Reserve characters 1 to 25 of the name of each card for a unique name, then use char 26 as an index for the b cards, and char 27 as an index for the c cards. Now the script of your "up" button for bg "b" needs to be something like: on mouseUp get the name of this cd put char 1 to 25 of it into aCard go to cd aCard of bg "a" -- do whatever error checking you like here.... end mouseUp and similarly for "up" btn for bg "c" The "next" button is much easier: on mouseUp go next cd of this bg end mouseUp In my application, there was a problem with ensuring unique names, so I eventually went to a single card, and toggled the visibility of the fields and buttons to achieve the same effect. Hope this helps, Trent