[fxruby-users] Option Menu help

lyle@knology.net lyle at knology.net
Wed Feb 1 13:05:19 EST 2006


On Wed, 01 Feb 2006 18:01:19 +0000, "Nick Brutyn" <brutyn_nick at hotmail.com>
wrote :

> when i select an item in the first list the  getGeotagsByClient() is 
> actived.
> 
>   def getGeotagsByClient()
>    getApp().beginWaitCursor() do
>     current_option = @clientMenu.getCurrentNo()
>     current_client_id = @clients[current_option-1].id
>     pane = FXPopup.new(self)
>     geotags = @driver.FetchGeotagsByClient(@@twa, @user.id, 
> current_client_id)
>     test = ""
>     for geotag in geotags
>      FXOption.new(pane, geotag.address1 + ", " + geotag.address2 + ", " + 
> geotag.floor, nil, nil, 0, JUSTIFY_HZ_APART|ICON_AFTER_TEXT)
>      test += geotag.address1 + "\n "
>     end
>     @testing.text = test
>     @geotagMenu.menu = pane
>    end
>   end
> 
> here the second list should be filled but isnt.
> "@testing" contains all the locations => CORRECT
> " @geotagMenu" only contains the first item, no the whole list
> 
> Can some help me?

What happens if you add a call to pane.create after you've added all of the
items:

    for geotag in geotags
      FXOptionMenu.new(pane, ...)
    end
    pane.create # <------- add this here
    @geotag.menu = pane

-- Lyle


More information about the fxruby-users mailing list