trouble with groups

Klaus Major klaus at major-k.de
Wed Apr 21 14:53:08 EDT 2004


Hi Paul,

> I'm struggling a bit with groups.
>
> Imagine an application which displays multiple "pages", one at a time, 
> each
> contained on a card, to an operator. The operator navigates from page 
> to
> page using a set of buttons (treated as a group) which looks the same 
> on all
> the display pages. So far so good; just create a group of buttons and 
> place
> it on each display page card. (I did not set it as background because 
> there
> is at least one page with no buttons).
>
> Now imagine that you want a different set of buttons for each "kind" 
> of user
> (i.e. supervisor, administrator, operator, etc.); some users can see 
> pages
> that others can't, and vice versa (assume that inactive buttons are
> undesirable). So I thought I would create a different group of buttons 
> (even
> though they are copies of buttons in other groups) and try to get the 
> right
> buttons to appear depending on who logs in.
>
> I am struggling with whether to "place" and "remove" the button groups 
> or
> leave them on all pages and use "show" and "hide" (the logistics of 
> that are
> cumbersome). I have managed to completely lose a button group by some
> unknown mistake, so I decided it was time to ask for advice.
>
> If anyone has any tips that might clarify the use of groups it might 
> help a
> lot. For instance, should I be using copies of buttons to make up the
> groups, or can an object be a member of more than one group at a time? 
> If
> so, I would still need to move them around to fill in around missing
> buttons. Or maybe I should forget groups altogether and just 
> hide/show/and
> move buttons to get what I need.
>
> Any insights are welcome - thanks.

Groups are very practical :-)
So i, personally, would use them...

I would create as much different groups as needed, on for the admin, 
one for...,
HIDE them all on preopenstack or something and show the appropriate 
group
after the appropriate user logged in...

A tiny bit more work at first, but might come handy later :-)

I also recommend to "outsource" your handlers to the stack- or 
card-script, to avoid
redundant code, since many of your buttons will use the same code for 
different users...

Hope that helps...

> -Paul

Regards

Klaus Major
klaus at major-k.de
www.major-k.de



More information about the use-livecode mailing list