From: Eloy D. <e....@su...> - 2008-05-07 12:50:46
|
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 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 |