[MacRuby-devel] KVC: different behaviour with set and =
Thibault Martin-Lagardette
thibault.ml at gmail.com
Mon May 17 01:00:04 PDT 2010
Hi !
What exactly is not working? You said you have "Controller.self.test", what do you mean by that?
Both setX and X= work for me, here is what I get:
$> cat t.rb
class A
attr_accessor :someAttr
end
a = A.new
a.setSomeAttr "set via #setSomeAttr"
p a.someAttr
a.someAttr = "set via #someAttr="
p a.someAttr
$> macruby t.rb
"set via #setSomeAttr"
"set via #someAttr="
--
Thibault Martin-Lagardette
On May 17, 2010, at 00:47, B. Ohr wrote:
>
> I have a binding of an user interface element to my controller (Controller.self.test): The setTest does work, but the 'test =' does not.
>
> class Controller < NSWindowController
> attr_accessor :test
>
> def works
> setTest true
> end
>
> def doesnotwork
> test = true
> end
>
> end
>
> Is this a bug?
>
> - Bernd
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
More information about the MacRuby-devel
mailing list