[futurebasic] Hierarchical popup menus in Appearance runtime

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2004 : Group Archive : Group : All Groups

From: Paul Bruneau <paul_bruneau@...>
Date: Thu, 27 May 2004 09:56:59 -0400

I am converting my application from STD BASIC runtime to Appearance 
runtime and I have a problem with hierarchical popup menus (popup menus 
with submenus).

In my STD version, I use what I call the FBII method of popup menus 
which is mainly handled by a toolbox call like this one:

menuResult& = FN POPUPMENUSELECT(FN GETMHANDLE(resourceID%), top%, 
left%, popItem%)

Where the returned value of menuResult& is a structure that has the 
menuID and the itemID that was chosen by the user. This makes it very 
easy to determine what submenu was selected, and what item in that 
submenu was selected. (top and left are where in global coordinates the 
menu will appear, and popItem% is which item will appear under the 
cursor when the menu is first drawn on the screen)

But I'm having trouble with Appearance popups. I want to use the 
correct method, and am doing something like this:

First, the definition of the popup "button" in appearance:
appearance button _myBevelButton,, _theResMenu, 0, 0, "Popup", @r, 

Then, here is the code that retrieves what the user selected (it is in 
a Dialog (event) select structure):
button( _myBevelButton, _fbGetBevelControlMenuVal )

This gets the item just fine. The problem is, how do I find out what 
submenu might have been selected?

Does anyone have any Appearance popup submenu code they'd be willing to 
share? Or a toolbox call they can point me to?

Thanks everyone,


PS: Where is the best place to get Appearance documentation for FB?? 
Apple's appearance stuff doesn't seem to relate to the FB Appearance 
tools that we have, and I haven't found FB Appearance docs yet.