Randy Harmon
rjhar****@yahoo*****
Mon Jan 28 05:58:27 JST 2008
What's the best way to go about debugging an app such as this? I can't seem to get XCode to let me set breakpoints in Ruby code. I've tried what's suggested at http://www.rubycocoa.com/an-introduction-to-rubycocoa/6/ but it seems to me that it might be a little outdated; following those instructions doesn't seem to make a difference. It seems like the Ruby.framework that ships with Leopard is taking over and not allowing me to do the debugging I'm trying to do. I'm able to ask Xcode to "Continue to Here" for a .rb source file, and it doesn't seem to matter whether I do this in the project directory or in Build/<foo>.app/Resources/ - it won't break. And that's just one of my own source code files - I'd rather be debugging RubyCocoa. I'd really like to debug this problem for myself but I don't know how to go about it. Any help you can offer? Randy P.S. Does the latest trunk reflect changes described in the Apple developer docs, or has Apple done something entirely separate from this project? Apple has made many performance improvements, involving the following: RubyCocoa uses the libffi library for function calling and message dispatch.Instead of a message-dispatch implementation based on objc_msgSend or NSInvocation, RubyCocoa uses the libffi library from the GCC project. libffi makes it possible to call an arbitrary C function in a processor-agnostic way. It provides more scalability and better performance than the other alternatives. RubyCocoa also uses libffi when overriding or registering an Objective-C method implemented in Ruby, and when converting Ruby closures to C function pointers. RubyCocoa efficiently copies objects as they cross the bridge either way. RubyCocoa efficiently looks up selectors and classes. ----- Original Message ---- From: Eloy Duran <e.dur****@super*****> To: rubyc****@lists***** Sent: Saturday, January 26, 2008 5:28:05 AM Subject: [Rubycocoa-devel 1292] Re: reflect_on_all_associations error Hi Randy, This is probably because of the recent speed improvements I added. Could you try to change the Emails ActiveRecordSetController into a BelongsToActiveRecordSetController? This change was added so that a new email record will only be saved after adding it to the collection that it belongs to, instead of saving the record, then updating the mailbox_id field and saving again. Cheers, Eloy On 26 jan 2008, at 03:10, Randy Harmon wrote: Greetings, I'm trying to reproduce Eloy's ActiveRecord demo on Leopard with Xcode 3. I've installed from trunk source (today), and I've successfully enabled my application to bind to the database, and to add Mailbox objects. When I go to create an email object for the selected mailbox, I get the following error. And when I go to create a second mailbox, I get the second (longer) error below. If I add an email record directly to the sqlite database file, that email record is displayed without a problem on re-launching the application. Does anyone have exposure to Xcode 3 or understand why this would be happening? Thanks, Randy /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:751:in `method_missing': undefined method `reflect_on_all_associations' for NilClass (NoMethodError) from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:278:in `is_association?' from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:377:in `initialize' from /Users/rjh/MailDemo20080123/build/Debug/MailDemo200801.app/Contents/Resources/rb_main.rb:25:in `new_with_ocid' from /Users/rjh/MailDemo20080123/build/Debug/MailDemo200801.app/Contents/Resources/rb_main.rb:25:in `NSApplicationMain' from /Users/rjh/MailDemo20080123/build/Debug/MailDemo200801.app/Contents/Resources/rb_main.rb:25 2008-01-25 18:04:16.338 MailDemo200801[36767:10b] OSX::ActiveRecordSetController#newObject: NoMethodError: undefined method `reflect_on_all_associations' for NilClass /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:751:in `method_missing' /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:278:in `is_association?' /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:377:in `initialize' /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50:in `ocm_send' /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50:in `method_missing' /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:72:in `newObject' /Users/rjh/MailDemo20080123/build/Debug/MailDemo200801.app/Contents/Resources/rb_main.rb:25:in `NSApplicationMain' /Users/rjh/MailDemo20080123/build/Debug/MailDemo200801.app/Contents/Resources/rb_main.rb:25 /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_import.rb:751:in `method_missing': undefined method `reflect_on_all_associations' for NilClass (NoMethodError) from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:278:in `is_association?' from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:377:in `initialize' from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50:in `ocm_send' from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50:in `method_missing' from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/active_record.rb:72:in `newObject' from /Users/rjh/MailDemo20080123/build/Debug/MailDemo200801.app/Contents/Resources/rb_main.rb:25:in `NSApplicationMain' from /Users/rjh/MailDemo20080123/build/Debug/MailDemo200801.app/Contents/Resources/rb_main.rb:25 _______________________________________________ Rubycocoa-devel mailing list Rubyc****@lists***** http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel -----Inline Attachment Follows----- _______________________________________________ Rubycocoa-devel mailing list Rubyc****@lists***** http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel -------------- next part -------------- An HTML attachment was scrubbed... ダウンロード