Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkbox not checking #61

Closed
noelwarr opened this issue Sep 27, 2013 · 4 comments
Closed

Checkbox not checking #61

noelwarr opened this issue Sep 27, 2013 · 4 comments
Labels
Milestone

Comments

@noelwarr
Copy link

The check! and uncheck! methods of the Checkbox class don't seem to work. Looking at the source code it seems obvious they wouldn't:

prop_reader_bool( :checked, &TypeCheck::BOOLEAN )

def check!
  checked = true
end

I'd have a go at changing this myself but I don't quite get the properties module yet :)

@thomthom
Copy link
Owner

checked = true here is not some local variable. It's a method call to checked=. check! is syntax sugar.

Got reproducible code?

@noelwarr
Copy link
Author

I thought checked was declared at the top as a prop_reader, not a
attr_accessor and that's why it didn't work
Here is the code: https://gist.github.com/noelwarr/b0b4f75e05002bc9b151

2013/9/27 Thomas Thomassen notifications@github.com

checked = true here is not some local variable. It's a method call to
checked=. check! is syntax sugar.

Got reproducible code?


Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-25255853
.

@thomthom
Copy link
Owner

Oh... Well that is embarrassing...

This is why I need to implement unit tests.

@noelwarr
Copy link
Author

:)

SKUI is much better than what I had going. Was it Linus torvalds that said
"all bugs are tiny with 100 eyes"? Something like that. SKUI might still
be a bit buggy but it's on a solid foundation. I have to buy you a drink
in Lisbon!

2013/9/27 Thomas Thomassen notifications@github.com

Oh... Well that is embarrassing...

This is why I need to implement unit tests.


Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-25258149
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants