CGI form method error

I’ve recently encountered this error:

[Wed Jun 02 14:10:19 2004] [error] [client 127.0.0.1]
/usr/lib/ruby/1.8/cgi.rb:1841:in popup_menu': undefined methodcollect’ for nil:NilClass (NoMethodError), referer:
http://localhost/~milo/cgi-bin/web_sfg.cgi

The offending code is the scrolling_list line in this block:

def get_genome(cgi,dbc)
cgi.form {
cgi.textarea(‘cols’=>‘20’,‘rows’=>‘1’,‘name’=>‘get_genome’) +
cgi.br +
cgi.scrolling_list(‘name’=>‘get_database’,‘values’=>dbc) +
cgi.br +
cgi.submit(‘value’=>‘Bring me switches!’)
}
end

dbc is an array like so:

[[‘swissprot’,true],[‘nr’]]

Is this a bug, or is my code somehow dodgy? I’d appreciate
a suggestion as to how to fix it, if so.
Thanks.

···


www.sirwilliamhope.org

Apparently it's case sensitive for #scrolling_list

    cgi.br +
    cgi.scrolling_list('name'=>'get_database','values'=>dbc) +

                cgi.scrolling_list('NAME'=>'get_database','VALUES'=>dbc) +

    cgi.br +

Guy Decoux

Thanks - it seems that that affects a few other methods,
too, then.

···

ts decoux@moulon.inra.fr wrote:

Apparently it’s case sensitive for #scrolling_list


www.sirwilliamhope.org

Thanks - it seems that that affects a few other methods,
too, then.

#checkbox_group, #radio_group seems also case sensitive

Guy Decoux