[MacRuby-devel] Should the HotCocoa example on the home page run on 0.5 beta 2?

B. Ohr jazzbox at 7zz.de
Sat Dec 19 03:13:18 PST 2009


I found the same error yesterday while debugging one of my broken HotCocoa Apps.


Am 19.12.2009 um 07:10 schrieb Jeremy Voorhis:

> I've just installed the latest MacRuby beta binaries on my new macbook, and this happens:
> 
> Jeremy-Voorhiss-MacBook-Pro:~ jvoorhis$ cat test.rb 
> require 'hotcocoa'
> include HotCocoa
> application do |app|
>   win = window :size => [100,50]
>   b = button :title => 'Hello'
>   b.on_action { puts 'World!' }
>   win << b
> end
> Jeremy-Voorhiss-MacBook-Pro:~ jvoorhis$ macruby --version
> MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, x86_64]
> Jeremy-Voorhiss-MacBook-Pro:~ jvoorhis$ macruby test.rb 
> 2009-12-18 22:06:45.181 macruby[76926:903] *** -[NSLock unlock]: lock (<NSLock: 0x2000a9600> '(null)') unlocked when not locked
> 2009-12-18 22:06:45.184 macruby[76926:903] *** Break on _NSLockError() to debug.
> /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/hotcocoa/mappings/application.rb:9:in `handle_block:': undefined method `on_action' for 0:NSButton (NoMethodError)
> 	from core:in `application:'
> 	from test.rb:2:in `<main>'
> 
> I've hardly used HotCocoa at all. This might have already been covered in some other thread that I wasn't paying attention to. If not, I can file something in trac.
> 
> Thanks,
> 
> Jeremy
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list