[Rubycocoa-devel 1292] Re: reflect_on_all_associations error

Zurück zum Archiv-Index

Eloy Duran e.dur****@super*****
Sat Jan 26 22:28:05 JST 2008


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

-------------- next part --------------
An HTML attachment was scrubbed...
Download 


More information about the Rubycocoa-devel mailing list
Zurück zum Archiv-Index