[macruby-changes] [540] MacRuby/trunk/lib/hotcocoa/mapper.rb
source_changes at macosforge.org
source_changes at macosforge.org
Sun Aug 31 18:45:47 PDT 2008
Revision: 540
http://trac.macosforge.org/projects/ruby/changeset/540
Author: rich at infoether.com
Date: 2008-08-31 18:45:46 -0700 (Sun, 31 Aug 2008)
Log Message:
-----------
use setMethod(value) if boolean true
Modified Paths:
--------------
MacRuby/trunk/lib/hotcocoa/mapper.rb
Modified: MacRuby/trunk/lib/hotcocoa/mapper.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/mapper.rb 2008-08-31 05:21:23 UTC (rev 539)
+++ MacRuby/trunk/lib/hotcocoa/mapper.rb 2008-09-01 01:45:46 UTC (rev 540)
@@ -50,7 +50,11 @@
inst.customize(control)
map.each do |key, value|
if control.respond_to?(key) && value == true
- control.send("#{key}")
+ if control.respond_to?("set#{key.to_s.capitalize}")
+ eval "control.set#{key.to_s.capitalize}(true)"
+ else
+ control.send("#{key}")
+ end
else
eval "control.#{key}= value"
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080831/6ca37a83/attachment.html
More information about the macruby-changes
mailing list