Modified: MacRuby/trunk/lib/hotcocoa/mappings/text_field.rb (394 => 395)
--- MacRuby/trunk/lib/hotcocoa/mappings/text_field.rb 2008-08-03 04:43:55 UTC (rev 394)
+++ MacRuby/trunk/lib/hotcocoa/mappings/text_field.rb 2008-08-03 04:44:50 UTC (rev 395)
@@ -1,9 +1,23 @@
HotCocoa::Mappings.map :text_field => :NSTextField do
+
+ constant :text_align, {
+ :right => NSRightTextAlignment,
+ :left => NSLeftTextAlignment,
+ :center => NSCenterTextAlignment
+ }
- defaults :selectable => true, :editable => true, :layout => {}
+ defaults :selectable => true, :editable => true, :layout => {}, :frame => DefaultEmptyRect
def init_with_options(text_field, options)
text_field.initWithFrame options.delete(:frame)
end
+ custom_methods do
+
+ def text_align=(value)
+ setAlignment(value)
+ end
+
+ end
+
end