Re: XForms: menus show the last selection made

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 22 Jul 98 07:08:32 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> # To subscribers of the xforms list from Dick Middleton <dick@sqf.hp.com> :
> > # To subscribers of the xforms list from <dweiss1@gwdg.de> :
> > I use xforms 0.88 on IRIX 6.4. When I design a form using fdesign and
> > test it from within fdesign, the menus work as I intended.
> > However, when I run the form on its own, as part of my application, all
> > menus suddenly have a new, additional entry: as the first entry in every
> > menu I have the title of the menu, and after selecting an entry from the
> > menu, this first entry changes to the name of the selected menu.
>
> I complained about this the other day - it's a pain. There was no response
> so I assume it's a bug/feature. ...

I believe, as per discussions earlier on this list, there may be a bug
in the structure form of the menu creation code.

However, I just tried a simple example and got the desired behavior
under 0.88.1.

Here's the .fd file I used:

- - - whack here - - -
Magic: 13000

Internal Form Definition File
(do not change)

Number of forms: 1
Unit of measure: FL_COORD_PIXEL

=============== FORM ===============
Name: try
Width: 320
Height: 250
Number of Objects: 2

--------------------
class: FL_BOX
type: UP_BOX
box: 0 0 320 250
boxtype: FL_UP_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
size: FL_DEFAULT_SIZE
lcol: FL_BLACK
label:
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name:
callback:
argument:

--------------------
class: FL_MENU
type: PULLDOWN_MENU
box: 20 20 110 30
boxtype: FL_FLAT_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_CENTER
style: FL_BOLD_STYLE
size: FL_DEFAULT_SIZE
lcol: FL_BLACK
label: Menu
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name:
callback:
argument:
content: foobar
content: baz
content: woof

==============================
create_the_forms
- - - stop whacking here - - -

spl
_________________________________________________
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/