From: Mehdi Adda Date: 2008-06-14T22:07:56+09:00 Subject: Re: fire event when the value of a variable is changed Tobias Weber wrote: > In article , > Mehdi Adda wrote: > >> I have told that if the value of the variable is changed via a sitter, >> it's possible to use a method chaining. How if there is no setter ? > > What kind of variable? Global, local, instance? For the latter you could > write your own attr_accessor method that either creates a call to a > custom method or uses update() of Observer. Thanks for the answer ... if fact when it's an instance variable, it's possible to (re)define the setter... the problem is when the variable is local. I checked the use of trace_var, and as Avdi said, it's only used to trace global variables assignments. Addame -- Posted via http://www.ruby-forum.com/.