>>>>> "m" == mips  <mips / cyberspace.org> writes:

m> ----begin----
m> 	pos_menu = Proc.new do
m> 		| m,x,y |

m> printf("x,y = %d,%d\n", x, y)

 this script work for me, i.e. it display the menu ("Halo Exit" at
 (824, 501)) 

pigeon% cat b.rb
#!/usr/bin/ruby
require 'gtk'
$main = Gtk::Window::new(Gtk::WINDOW_TOPLEVEL)
pos_menu = Proc.new do | m,x,y |
   puts "x, y = #{x}, #{y}"
   [824, 501]
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, 1, 1)
Gtk::main
pigeon% 


Guy Decoux