class Lebowski::Foundation::Views::CheckboxView

Represents a proxy to a SproutCore button view (SC.CheckboxView)

Constants

MIXED_STATE

A value the view's isSelected property can return other than a boolean value

Public Instance Methods

deselect() click to toggle source
# File lib/lebowski/foundation/views/checkbox.rb, line 20
def deselect()
  if in_mixed_state?
    click
    click
  elsif is_selected?
    click
  end
end
in_mixed_state?() click to toggle source

Used to check if this view is in a mixed state. The view is in a mixed state if it has assigned value but nothing is selected

# File lib/lebowski/foundation/views/checkbox.rb, line 44
def in_mixed_state?()
  return (self['isSelected'] == MIXED_STATE)
end
is_checked?()
Alias for: is_selected?
is_selected?() click to toggle source
# File lib/lebowski/foundation/views/checkbox.rb, line 33
def is_selected?()
  val = self['isSelected']
  return (val == true or val == MIXED_STATE)
end
Also aliased as: is_checked?
select() click to toggle source
# File lib/lebowski/foundation/views/checkbox.rb, line 29
def select()
  click if (not is_selected?) or in_mixed_state?
end