From: Pim S. <pi...@li...> - 2008-05-07 13:52:27
|
Op 7 mei 2008, om 14:50 heeft Eloy Duran het volgende geschreven: > Hi Pim, > > This is because #description is the #inspect method in Cocoa. > What you could do is override it with the correct arity on the proxy > and make it return the correct value: > > class ProjectProxy > def description > @record.description > end > end > > Eloy Hello Eloy, Thanks for your fast reply. Overriding in the proxy does not work :( I still get the same error. Other suggestions? I read on your website that the current rubycocoa- trunk fixes this problem. Should I install this? Regards, Pim > > On May 7, 2008, at 2:20 PM, Pim Snel wrote: >> Hello, >> >> I just start learning Ruby, Cocoa and RubyCocoa and I am really >> enjoying it. Now I have a problem using the activerecord bindings. >> I'm trying to read an existing table which contains a column named >> 'description'. When I run the app I get the following error: >> >> 2008-05-07 14:10:18.150 machour[16767:10b] >> ProjectProxy#rbValueForKey: RuntimeError: Cannot override Objective- >> C method 'description' with Ruby method #description, they should >> both have the same number of arguments. (expected arity 0, got -1) >> >> When I remove the column everything works as should, but that's not >> possible in my case. Is there a way to tackle this? >> >> regards, >> Pim Snel >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save >> $100. >> Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |