From: mips Date: 2002-05-14T23:29:28+09:00 Subject: Re: [BUG] trying to fix ruby-gtk's menu.popup > best to write it, in your case > > *px = NUM2INT(RARRAY(arr)->ptr[0]); > *py = NUM2INT(RARRAY(arr)->ptr[1]); > > NUM2INT() is a macro and you can call many times rb_ary_entry() I'll try it. > m> The coordinates sent to the reposition function are now good > (instead of the pointer values sent before :), but there is still > no display of the menu, so i'm lost and i dunno what is the > problem. > > How do you use it ? it seems to work with me, with your > modifications. Here is the code : ----begin---- pos_menu = Proc.new do | m,x,y | printf("x,y = %d,%d\n", x, y) # x = x + 10 return [x,y] end $menu = Gtk::Menu.new $menu.append(halo_item = Gtk::MenuItem.new('Halo')) $menu.append(exit_item = Gtk::MenuItem.new('Exit')) exit_item.signal_connect('activate') do $menu.popdown $main.destroy exit end $menu.show_all $menu.set_active(0) $menu.popup(nil, nil, pos_menu, b, t) ----end---- I can't see were i can be wrong with that, but there is about one month i'm on this problem and i maybe miss something big and simple :) mips