Igor Pirnovar wrote:
> 
> To test my claim that you have a scope problem change your "instance" 
> variable from {{ @options_list }} to global {{ $options_list }}. The 
> program should then work fine; i.e.: here is no "gtk container 
> add/remove malfunction"!
> 

@options_list is a class instance variable defined in no class (so in 
the class Object by default)
@options_list = Gtk::VBox.new(false,5)

I access @options_list within the same class Object (by default).
Yes it is not an malfunction, but something I don't understand.
The curiosity is that remove the child widget within the container works 
in the signal block, so it should not be a scope problem. Only adding 
element (even if not removing any) does not work.

replacing @options_list with $options_list does not solve the problem, 
the result is the same.

> To correctly fix your program, and at the same time avoid any 
> differences between ruby 1.8 and 1.9, implement attribute accessor 
> methods and access your instance variables only through their respective 
> objects using the accessor methods (hint: attr_accessor).
> 
> Good luck,
> Igor

I'm accessing @options_list within the same object, I'm not sure I 
should create an accessor for it, as I want to keep it private and use 
it only within this Object class instance. Or should I ?

Thanks,
Kevin REDON
-- 
Posted via http://www.ruby-forum.com/.