Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 1995 10:24:51 -0800
From:      perry@pure.com (Perry Clarke)
To:        oi-users@freefall.cdrom.com
Subject:   Getting the selection in an OI_abbr_menu
Message-ID:  <199503161824.AA19688@pure>

next in thread | raw e-mail | index | archive | help
[OI 4.5, Solaris 5.4]

I'm having a bit of trouble finding out which is the selected cell in an
OI_abbr_menu.  None of the members which relate to the currently selected
cell will admit to anything being selected.

For example, the following code fragment always prints "num_selected -1"
although the menu obviously has a currently selected item:

    else if ( obj->is_derived_from( "OI_abbr_menu" ) )
    {
        printf("\nSetOptionsFromFields: num_selected %d\n", 
            ((OI_menu *)obj)->num_selected() );
    }
 
I've also tried iterating through the menu cells.  I can print their names
but none of them will admit to being selected.

I know that I could use a callback to record the changing selection and
assume that the last change was the one I wanted but I'm trying to keep
this simple and just use the vanilla OI objects.

What's the trick?
 
Perry
--
Perry Clarke       perry@pure.com <> peregrine@eworld.com       (408) 524 3058
                        Pure Software, Sunnyvale, CA




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503161824.AA19688>