[MacRuby-devel] Delegate methods defined in modules
Zach Holt
lists at wzph.com
Wed May 21 10:42:38 PDT 2008
#!/usr/bin/env macruby
framework 'cocoa'
module AppDelegateModule
def applicationDidFinishLaunching( n )
puts "exiting..."
NSApp.terminate( nil )
end
end
class AppDelegateClass
include AppDelegateModule
end
NSApplication.sharedApplication
NSApp.delegate = AppDelegateClass.new
NSApp.run
__END__
Hi all,
I'm porting http://www.paulhammond.org/webkit2png/ as a learning
exercise.
Should the above terminate?
It doesn't on trunk rev 202, but it does if you move
applicationDidFinishLaunching to AppDelegateClass.
Thanks!
More information about the MacRuby-devel
mailing list