[MacRuby-devel] [MacRuby] #275: [HotCocoa] convert underscore names to camelcase names in mapper

MacRuby ruby-noreply at macosforge.org
Sun May 31 13:49:58 PDT 2009


#275: [HotCocoa] convert underscore names to camelcase names in mapper
---------------------------------+------------------------------------------
 Reporter:  dj2@…                |       Owner:  lsansonetti@…        
     Type:  enhancement          |      Status:  new                  
 Priority:  minor                |   Milestone:                       
Component:  MacRuby              |    Keywords:                       
---------------------------------+------------------------------------------

Comment(by dj2@…):

 Add a test_mapping_methods test to the mapper_test suite. Covers the
 current cases in the mapper.

 The camel_case method was part of the sample-macruby mvc code. I've copied
 that, and underscore into attribute_string.rb as additions to the string
 class. I also created an attributed_string_test case and moved the
 underscore test over there along with a simple camel case test.

 I tried using control.send("#{key}=", value) and got the following error
 (I'm assuming because the title= method is automatically remapped to
 setTitle?)
 /Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/hotcocoa/mapper.rb:57:in
 `send': super: no superclass method `title=:' for #<NSWindow:0x80032c8e0>
 (NoMethodError)

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/275#comment:2>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list