[MacRuby-devel] Checkbox state

Marinus van der Lugt lugt at xs4all.nl
Wed Jul 8 06:06:37 PDT 2009


Hi All,

First post, so a little bit about me: I am a SW engineer and have been one
for over 20 years, increadible as that may sound. I have programmed on the
Mac before in Ada95, Obj-C and Java (but I have had a pause of about 5
years from the Mac). Now that MacRuby seems to gain some foothold I'd like
to get back to the mac and make the jump from Obj-C to MacRuby.

I work in Xcode, and have just started a new MacRuby Core-Data Application.

The first goings look good, but in implementing my first window controller
I ran into a (little?) problem: I cannot get the state of a checkbox:

status = @myCheckbox.state

always returns a Fixnum with value 0. regardless of the visual
representation of the checkbox (i.e. selected or not)

The checkbox should be mapped correctly because:

myTitle = @myCheckbox.title

does indeed give me the title I set in the IB.
I checked the archives but did not find any discussions about this.
There was something about checkboxes and hotcocoa, but I do not use hotcocoa.

The best solution would be a simple stupid mistake on my part :-)

Any takers?

Regards,
Rien.



More information about the MacRuby-devel mailing list