Skip to content

Commit

Permalink
Ensuring that checking and unchecking methods of the Checkbox control…
Browse files Browse the repository at this point in the history
… work. Fixing #61.
  • Loading branch information
thomthom committed Sep 29, 2013
1 parent 4ecf071 commit 17d6b9f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/SKUI/checkbox.rb
Expand Up @@ -12,7 +12,7 @@ class Checkbox < Control

# @return [Boolean]
# @since 1.0.0
prop_reader_bool( :checked, &TypeCheck::BOOLEAN )
prop_writer( :checked, &TypeCheck::BOOLEAN )

# @since 1.0.0
define_event( :change )
Expand All @@ -31,25 +31,25 @@ def initialize( label, checked = false )
# @return [Boolean]
# @since 1.0.0
def check!
checked = true
self.checked = true
end

# @return [Boolean]
# @since 1.0.0
def checked?
checked = window.bridge.get_checkbox_state( ui_id )
self.checked = window.bridge.get_checkbox_state( ui_id )
end

# @return [Boolean]
# @since 1.0.0
def toggle!
checked = !checked?
self.checked = !checked?
end

# @return [Boolean]
# @since 1.0.0
def uncheck!
checked = false
self.checked = false
end

end # class
Expand Down

0 comments on commit 17d6b9f

Please sign in to comment.