XForms: Cascading menus

Joel Weiner (weiner@mcci-arl-va.com)
Thu, 24 Jul 1997 17:42:38 -0400

To subscribers of the xforms list from weiner@mcci-arl-va.com (Joel Weiner) :

I'm trying to build a set of three cascading menus. The problem is that the
last menu in several branches must be dynamically created so that it
contains selections from a list of items which may have had deletions and
additions since the last time the menu was displayed.

To do this I have been generating the menus via popups. I create the last menu
in a prehandler which is triggered by a button press in the main menu object.

The pseudo code to do this is as follows:
if( event == FL_PUSH )
update current list of items
if menu is not free
free it and initialize subsubmenu_ID and counters
fl_newpup
while there are items on my list
format a string with item and count
fl_addtopup( subsubmenu_ID, formatted string )
get next item in list
increment count
fl_setpup_submenu( sub_menu_ID, sub_menu_entry_value, subsubmenu_ID )
return( !FL_PREEMPT )

The above seems to work, and all the menus cascade fine, but here's the problem:
How do I generate a unique value at the end of the selection?
Ideally I would like to add values to a base number at each cascade level, something like:
Level 1 level 2 level 3
10000 + 1000 + 1 = selection 1
30000 + 4000 + 1 = selection 2

Question 1: Does setting an entry in the submenu to a subsubmenu
prevent/preempt binding a function to that entry via %f?

Question 2: Is there a way I can access/set a selection value at each step in
the cascade selection?

Thanx,
Joel
weiner@mcci-arl-va.com
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/