From: Hans Fugal Date: 2003-07-02T13:54:20+09:00 Subject: FXDataTarget not updating my variable I have the following: @datatarget = FXDataTarget.new(@name) @datatarget.connect(SEL_COMMAND) do |s,i,data| puts "#{data},#{@name}" end # ... in another class ... FXTextField.new(parent,80,obj.datatarget,FXDataTarget::ID_VALUE) l = FXLabel.new(parent,"foo") l.target = obj.datatarget l.selector = FXDataTarget::ID_VALUE The label updates correctly. If it starts out as 'foo', and I change it to 'bar' and press enter in the FXTextField, this is what is printed: bar,foo But I was under the impression that a datatarget would update the variable as it was changed. Is that wrong? If not, why is this happening? I can of course set @name in the connect block but that seems silly since that's the whole point of a data target, or so I thought. -- Hans Fugal | De gustibus non disputandum est. http://hans.fugal.net/ | Debian, vim, mutt, ruby, text, gpg http://gdmxml.fugal.net/ | WindowMaker, gaim, UTF-8, RISC, JS Bach --------------------------------------------------------------------- GnuPG Fingerprint: 6940 87C5 6610 567F 1E95 CB5E FC98 E8CD E0AA D460