From owner-oi-users Thu Mar 16 10:23:00 1995 Return-Path: oi-users-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA18309 for oi-users-outgoing; Thu, 16 Mar 1995 10:23:00 -0800 Received: from pure (pure.pure.com [192.232.1.1]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id KAA18272 for ; Thu, 16 Mar 1995 10:22:51 -0800 Received: from helios.pure.com by pure (5.65c/PURE-SERVER-2.0) id AA19688; Thu, 16 Mar 1995 10:24:51 -0800 Date: Thu, 16 Mar 1995 10:24:51 -0800 From: perry@pure.com (Perry Clarke) Message-Id: <199503161824.AA19688@pure> Received: by helios.pure.com (4.1/CLIENT-1.0) id AA08919; Thu, 16 Mar 95 10:24:49 PST To: oi-users@freefall.cdrom.com Subject: Getting the selection in an OI_abbr_menu Reply-To: perry@pure.com Sender: oi-users-owner@FreeBSD.org Precedence: bulk [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