Further to my email of yesterday regarding the different behaviour of v1.0.0 on different macs.
I have tried reloading v1.0.0 several times on the iMac but the crash on requiring 'osx/cocoa'persists. I have reverted, successfully to 0.13.2 on that box.
The MailDemoActiveRecordBindings example in /Developer/Examples/Rubycocoa/MailDemo crashes with the following output:
Mailbox Load (0.000558) SELECT * FROM mailboxes
2009-08-12 16:49:25.192 MailDemoActiveRecordBindings[322:10b] MyController#init: RuntimeError: Cannot override Objective-C method 'title' with Ruby method #title, they should both have the same number of arguments. (expected arity 0, got -1)
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:346:in `_ns_behavior_method_added'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:684:in `method_added'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:364:in `define_method'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:364:in `define_record_methods!'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:363:in `class_eval'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:363:in `define_record_methods!'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:362:in `each'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:362:in `define_record_methods!'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:225:in `init'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:233:in `initWithRecord'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:44:in `to_activerecord_proxy'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:52:in `to_activerecord_proxies'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:52:in `map'
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:52:in `to_activerecord_proxies'
/Developer/Examples/RubyCocoa/MailDemo/MailDemoActiveRecordBindings/build/Debug/MailDemoActiveRecordBindings.app/Contents/Resources/MyController.rb:15:in `init'
/Developer/Examples/RubyCocoa/MailDemo/MailDemoActiveRecordBindings/build/Debug/MailDemoActiveRecordBindings.app/Contents/Resources/rb_main.rb:17:in `NSApplicationMain'
/Developer/Examples/RubyCocoa/MailDemo/MailDemoActiveRecordBindings/build/Debug/MailDemoActiveRecordBindings.app/Contents/Resources/rb_main.rb:17
/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:346:in `_ns_behavior_method_added': Cannot override Objective-C method 'title' with Ruby method #title, they should both have the same number of arguments. (expected arity 0, got -1) (RuntimeError)
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:684:in `method_added'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:364:in `define_method'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:364:in `define_record_methods!'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:363:in `class_eval'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:363:in `define_record_methods!'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:362:in `each'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:362:in `define_record_methods!'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:225:in `init'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:233:in `initWithRecord'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:44:in `to_activerecord_proxy'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:52:in `to_activerecord_proxies'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:52:in `map'
from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:52:in `to_activerecord_proxies'
from /Developer/Examples/RubyCocoa/MailDemo/MailDemoActiveRecordBindings/build/Debug/MailDemoActiveRecordBindings.app/Contents/Resources/MyController.rb:15:in `init'
from /Developer/Examples/RubyCocoa/MailDemo/MailDemoActiveRecordBindings/build/Debug/MailDemoActiveRecordBindings.app/Contents/Resources/rb_main.rb:17:in `NSApplicationMain'
from /Developer/Examples/RubyCocoa/MailDemo/MailDemoActiveRecordBindings/build/Debug/MailDemoActiveRecordBindings.app/Contents/Resources/rb_main.rb:17
The Debugger has exited with status 1.The Debugger has exited with status 1.
If you wish me to do any further investigation, please advise.
regards
Martin Hawkins
I also happened to bump into this problem, see https://sourceforge.net/mailarchive/forum.php?thread_name=aac3cf150908311026h3cfa7078p67f3d52bb7b7293%40mail.gmail.com&forum_name=rubycocoa-talk
Though I haven't gotten any feedback on the issue I came to the conclusion that maybe subclasses of NSObject aren't allowed to have optional arguments, because that's the way Obj-C works. Maybe should try talking too #ruby-osx on IRC?