#206: HotCocoa: Mapped methods not available in subclass -------------------------------+-------------------------------------------- Reporter: flat...@… | Owner: lsansone...@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: hotcocoa -------------------------------+-------------------------------------------- I'm trying to build a custom NSBox in a MacRuby X-Code project. This is my code:
{{{ require 'hotcocoa' # make sure that this file is loaded. require 'hotcocoa/mappings/color' class MyBox < NSBox include HotCocoa::Behaviors def initWithFrame(frame) super setDefaults end def awakeFromNib setDefaults end def setDefaults setBoxType :NSBoxCustom setBorderType :NSLineBorder borderWidth = 2.0 setBorderColor(color :red => 0.29, :green => 0.26, :blue => 0.55) end end }}} results in {{{ MyBox.rb:18:in `setDefaults': undefined method `color' for #<MyBox:0x16c0230> (NoMethodError) from .../.../My.app/Contents/Resources/MyBox.rb:7:in `initWithFrame' from .../.../MyApp/build/Release/My.app/Contents/Resources/rb_main.rb:24:in `NSApplicationMain' from .../.../MyApp/build/Release/My.app/Contents/Resources/rb_main.rb:24:in `<main>' }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/206> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel