class RMQTextChange

developer.android.com/reference/android/text/TextWatcher.html there seems to be a bug with this particular interface - subclassing this class works around it community.rubymotion.com/t/how-to-use-textwatcher-to-listen-to-changes-of-an-edittext/522

Attributes

change_block[RW]

Public Class Methods

new(action=:after, &block) click to toggle source
# File lib/project/ruby_motion_query/rmq/event_wrappers/rmq_text_change.rb, line 7
def initialize(action=:after, &block)
  @action = action
  @change_block = block
end

Public Instance Methods

afterTextChanged(s) click to toggle source
# File lib/project/ruby_motion_query/rmq/event_wrappers/rmq_text_change.rb, line 20
def afterTextChanged(s)
  @change_block.call(s) if @action == :after
end
beforeTextChanged(s, start, count, after) click to toggle source
# File lib/project/ruby_motion_query/rmq/event_wrappers/rmq_text_change.rb, line 16
def beforeTextChanged(s, start, count, after)
  @change_block.call(s, start, count, after) if @action == :before
end
onTextChanged(s, start, before, count) click to toggle source
# File lib/project/ruby_motion_query/rmq/event_wrappers/rmq_text_change.rb, line 12
def onTextChanged(s, start, before, count)
  @change_block.call(s, start, before, count) if @action == :on
end