[Nitro] wrong number of arguments (8 for 7) Kirby

Bryan Soto bryan.a.soto at gmail.com
Mon Jan 23 13:39:36 EST 2006


Hi, tis a bug. Could you try the attached patch?

On 1/23/06, Chris Burnley <chris.burnley at gmail.com> wrote:
>
> Hi, I'm running the blog example (examples-0.27.0), but instead of using
> mysql,  I'm using Kirbybase (2.5.2) and I get the following error:
>
> ERROR -- : wrong number of arguments (8 for 7)
> /usr/lib/ruby/gems/1.8/gems/KirbyBase-2.5.2/lib/kirbybase.rb:3125:in
> 'kb_create'
> /usr/lib/ruby/gems/1.8/gems/KirbyBase-2.5.2/lib/kirbybase.rb:3125:in
> 'create_result_rec'
> /usr/lib/ruby/gems/1.8/gems/KirbyBase-2.5.2/lib/kirbybase.rb:3174:in
> 'get_matches'
>
> This seems to be on the list method, as the insert into the db looks ok (
> from looking at the text files that Kirby creates ).
>
> I've also seen the same error on the "todo" tutorial ( can't remember who
> wrote that though).
>
> I'm a r00b, so I could be completely off here, but is it that the numbers
> of columns returned from Kirby into the enchanted class are different to
> what is expected ?
>
> If I look at the database files that kirby creates, I notice that
> recno:Integer is listed twice.
>
> regards,
>
> Chris Burnley
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060123/500eb69a/attachment.html 
-------------- next part --------------
--- lib/og/store/kirby.rb~	2006-01-23 10:33:10.000000000 -0800
+++ lib/og/store/kirby.rb	2006-01-23 10:33:29.000000000 -0800
@@ -68,14 +68,14 @@
     klass.send :alias_method, :recno, :oid
     klass.send :alias_method, :recno=, :oid= 
 
-    unless klass.properties.include? :recno
-      klass.property :recno, Fixnum
-    end
+#    unless klass.properties.include? :recno
+#      klass.property :recno, Fixnum
+#    end
 
     symbols = klass.properties.keys
 
     klass.module_eval %{
-      def self.kb_create(#{symbols.join(', ')})
+      def self.kb_create(recno, #{symbols.join(', ')})
         obj = self.allocate
         obj.recno = recno
         #{ symbols.map { |s| "obj.#{s} = #{s}; "} }


More information about the Nitro-general mailing list