#624: assigning a layout_view to a layout_view in a block and then assigning it to a window.view: fails ----------------------------------------+----------------------------------- Reporter: pontus.stromd...@… | Owner: lsansone...@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: hotcocoa layout_view setFrame superclass ----------------------------------------+----------------------------------- I built MacRuby from the trunk and started a hotcocoa app that I've been working. I got this little thing:
/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/layout_view.rb:321:in `setFrame:': super: no superclass method `setFrame' for #<HotCocoa::LayoutView:0x2005d32c0> (NoMethodError) So far I've tracked the problem to the following: if I do this, (assume that I have the code from the start method in the hotcocoa tutorial) win.view = layout_view do |view1| view1 << layout_view end then I get the error above. (see first trace below) if I do this instead win.view = layout_view view2 = layout_view win.view << view2 everything is well, except for some NSLock thing (see second trace below). This does not happen with 0.5. I used both the hotcocoa 0.5.1 gem as well as the current master from dj2. Running snow leopard on a macbook pro. pontus> macruby -v MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64] === First trace === pontus> macruby test.rb 2010-02-25 11:41:22.388 macruby[73985:903] *** -[NSLock unlock]: lock (<NSLock: 0x2000fea20> '(null)') unlocked when not locked 2010-02-25 11:41:22.391 macruby[73985:903] *** Break on _NSLockError() to debug. /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/layout_view.rb:321:in `setFrame:': super: no superclass method `setFrame' for #<HotCocoa::LayoutView:0x2005d32c0> (NoMethodError) from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/layout_view.rb:260:in `frame=:' from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/layout_view.rb:372:in `block' from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/layout_view.rb:364:in `relayout!' from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/layout_view.rb:326:in `setFrameSize:' from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/layout_view.rb:321:in `setFrame:' from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/mappings/window.rb:71:in `view=:' from /Users/pontus/Workcopies/spike/macruby/setFrame_Fail/test.rb:9:in `block' from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/mapper.rb:43:in `block' from /Users/pontus/Workcopies/spike/macruby/setFrame_Fail/test.rb:7:in `block' from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/mappings/application.rb:8:in `handle_block:' from /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/Gems/1.9.0/gems/hotcocoa-0.5.1.1/lib/hotcocoa/mapper.rb:43:in `block' from /Users/pontus/Workcopies/spike/macruby/setFrame_Fail/test.rb:1:in `<main>' pontus> macruby test.rb === Second trace === 2010-02-25 11:42:41.826 macruby[73989:903] *** -[NSLock unlock]: lock (<NSLock: 0x20053a340> '(null)') unlocked when not locked 2010-02-25 11:42:41.828 macruby[73989:903] *** Break on _NSLockError() to debug. -- Ticket URL: <http://www.macruby.org/trac/ticket/624> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel