Re: XForms: bug in fl_set_menu_item_mode

Martin J. Evans (martin@mjedev.demon.co.uk)
Thu, 08 Oct 1998 09:06:58 +0100 (BST)

# To subscribers of the xforms list from "Martin J. Evans" <martin@mjedev.demon.co.uk> :

On 20-Sep-98 T.C. Zhao wrote:
># To subscribers of the xforms list from "T.C. Zhao"
># <tc_zhao@yahoo.com> :
>
>
>
> Thanks for the report. Reproduced and fixed. The fix
> will be in the next release.
>

Since you have fixed this problem can you tell me if it is the same as
the one I'm having. My forms, menus etc are created with fdesign. If I
set a menu option to FL_PUP_GREY in fdesign the menu item is greyed out
when I run the program. However if I call fl_set_menu_item_mode() to
change the menu item back to FL_PUP_NONE (to make it selectable) in my
program, nothing happens - it stays greyed out. If I leave the menu
items as FL_PUP_NONE in fdesign but grey them out in the program,
similarly they are not greyed out.

Is this a bug or is it more likely I'm doing something wrong?
If a bug, is there a workaround?

I've seen other apps greying out menu items (e.g. xisp and xfmail) so
you must be able to get it to work somehow.

(I am using 0.88 on Linux 2.1.33 in case it makes any difference).

Thanks

Martin

>
> ---Manolo Gouy <mgouy@biomserv.univ-lyon1.fr> wrote:
>>
>> # To subscribers of the xforms list from Manolo Gouy
> <mgouy@biomserv.univ-lyon1.fr> :
>>
>> A problem with fl_set_menu_item_mode:
>>
>> I have a menu with the following items:
>> Create item
>> Delete item
>> item 1
>> item 2
>> item 3
>> etc...
>>
>> Items 1,2,... can be displayed either in modes FL_PUP_NONE or
> FL_PUP_CHECK
>> "Create item" adds an item at the current end of the menu using
> fl_addto_menu
>> "Delete item" deletes from the menu the single item displayed with
> FL_PUP_CHECK
>> using fl_delete_menu_item
>>
>> Selecting any item 1,2,... sets it to the FL_PUP_CHECK mode and sets
>> other items, if any, to the FL_PUP_NONE mode. Function
> fl_set_menu_item_mode
>> is used for these operations.
>>
>> The menu itself is initially created with
>> menu = fl_add_menu(FL_PULLDOWN_MENU, 5, 5, menu_width, 25, "Title");
>> fl_set_menu(menu, "Create item|Delete item%l");
>>
>> The problem is that once the delete function is used, further items
> added
>> to the menu never get displayed with the FL_PUP_CHECK mode: the
> check box does
>> not appear. If the delete function is never called, switching
>> between
>> FL_PUP_NONE and FL_PUP_CHECK modes occurs correctly.
>>
>> Trying to switch between FL_PUP_CHECK and FL_PUP_BOX instead does
> not change
>> the bug: the delete function makes the FL_PUP_CHECK mode disappear.
>>
>> Another problem is that function fl_get_menu_maxitems always returns
> 0,
>> whatever the state of the menu!
>>
>> I'm on a sun with Solaris 2.5 and use xforms v 0.88
>>
>>
----------------------------------
E-Mail: Martin J. Evans <martin@mjedev.demon.co.uk>
For Linux/Tecra information see http://www.mjedev.demon.co.uk/index.html
Date: 08-Oct-98, Time: 08:59:01
----------------------------------
_________________________________________________
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/