[macruby-changes] [333] MacRuby/trunk/lib/hotcocoa/mappings/control.rb

source_changes at macosforge.org source_changes at macosforge.org
Tue Jul 8 15:34:47 PDT 2008


Revision: 333
          http://trac.macosforge.org/projects/ruby/changeset/333
Author:   lsansonetti at apple.com
Date:     2008-07-08 15:34:46 -0700 (Tue, 08 Jul 2008)
Log Message:
-----------
convenience #to_i, #to_f and #to_s methods on NSControl

Modified Paths:
--------------
    MacRuby/trunk/lib/hotcocoa/mappings/control.rb

Modified: MacRuby/trunk/lib/hotcocoa/mappings/control.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/mappings/control.rb	2008-07-08 22:31:48 UTC (rev 332)
+++ MacRuby/trunk/lib/hotcocoa/mappings/control.rb	2008-07-08 22:34:46 UTC (rev 333)
@@ -19,7 +19,19 @@
     def text=(text)
       setStringValue(text)
     end
+
+    def to_i
+      intValue
+    end
+
+    def to_f
+      doubleValue
+    end
     
+    def to_s
+      stringValue
+    end
+
   end
 
 end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080708/93108485/attachment.html 


More information about the macruby-changes mailing list