durusmail: quixote-users: empty list of options for SelectWidget
empty list of options for SelectWidget
Re: empty list of options for SelectWidget
2006-09-07
2006-09-07
2006-09-07
empty list of options for SelectWidget
Neil Schemenauer
2006-09-07
Does anyone remember why SelectWidget disallows an empty list of
options?

        self.options = []
        if not options:
            raise ValueError, "a non-empty list of 'options' is required"
        else:
            self.set_options(options, sort)

I see that BigMultipleSelect widget works around this by creating a
SingleSelectWidget subclass that allows an empty list of options.  I
also have a another case were the list of options can be empty.

I'm thinking of just removing the check.

  Neil
reply