Popup by card

David Vaughan drvaughan55 at mac.com
Sun Jun 30 05:41:01 EDT 2002


On Sunday, June 30, 2002, at 03:11 , David Vaughan wrote:

> I am reinventing a HyperCard application which, among many other 
> things, stores on a card the sector to which a company belongs. I used 
> to enter this text in a field in the HC version but that led to errors 
> of memory and of consistency - this data is used for grouping some 
> reports.
>
> I created two popup menu buttons, one for sector and the other 
> dynamically changing its options for subsector. These work well and 
> look attractive, except for the small detail that the sector is the 
> same on every card. Unless I was to classify all companies as 
> "accounting fraud"  I needed something local to a card. So I had these 
> three ideas for the Rev implementation.
>
> 1. Create a hidden field or a property where I store the last selection 
> and update the button display on preopencard. I feel it ought to be 
> simpler than this. I would need the field anyway so I can sort by 
> sector.
>
> 2. Take the popup menus out of the group and, when creating a new card, 
> clone them. This should keep them independent but may add to 
> maintenance woes. Can you sort by the label of independent buttons of 
> the same name? Presumably not.
>
> 3. Ask you. Any niftier ideas, or something I have missed in the 
> documentation?

Pending a better idea, I kept the buttons in the group and created a 
hidden field containing two words, the two menuhistory integers for the 
two buttons. These are set by the popup menu buttons and read by 
preopencard to set those buttons. I rather wanted to create two stack 
properties indexed by the card id but the need to sort the cards led to 
preferring the field.

regards
David
>
> thanks
> David
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list