lib/under_os/ui/textarea.rb in under-os-1.1.0 vs lib/under_os/ui/textarea.rb in under-os-1.2.0
- old
+ new
@@ -1,14 +1,19 @@
-class UnderOs::UI::Textarea < UnderOs::UI::View
- include UnderOs::UI::Editable
-
+class UnderOs::UI::Textarea < UnderOs::UI::Input
wraps UITextView, tag: 'textarea'
- def initialize(options={})
- super
+ alias :text= :value= # to get values from the HTML layouts
- self.value = options[:value] if options[:value]
- self.keyboard = options[:keyboard] if options[:keyboard]
+# delegate
+
+ def textViewDidBeginEditing(textView)
+ handle_focus
end
- alias :text= :value= # to get values from the HTML layouts
+ def textViewDidChange(textView)
+ handle_change
+ end
+
+ def textViewDidEndEditing(textView)
+ handle_blur
+ end
end