[web2py] Re: issue with multi-select widget

2014-06-05 Thread Mandar Vaze
On Wednesday, November 21, 2012 12:38:36 AM UTC+5:30, SamD wrote: > Would'nt it be more convenient to force whatever is passed to behave as a > list (of strings) ? Came across response from Massimo about this here : https://groups.google.com/d/msg/web2py/Je-joYm3ob4/yrhE5r09vI4J TL:DR : Yes

[web2py] Re: issue with multi-select widget

2012-12-11 Thread Derek
I suppose so. You could just take an empty list, append request.vars.mylist to it, and then it should definitely be a list. On Tuesday, November 20, 2012 12:08:36 PM UTC-7, SamD wrote: > > Thanks, I found those fixes useful. At the same time, it is quite a pain > to have a message of error sayin

[web2py] Re: issue with multi-select widget

2012-11-20 Thread SamD
Thanks, I found those fixes useful. At the same time, it is quite a pain to have a message of error saying the type is not correct just because the list we pass contains only one element or no element. Would'nt it be more convenient to force whatever is passed to behave as a list (of strings) ?

[web2py] Re: issue with multi-select widget

2012-04-03 Thread Cliff
>>> l = 'bla' >>> if type(l)==str: ... l=[l] ... >>> type(l) >>> On Friday, March 30, 2012 6:36:01 AM UTC-4, weheh wrote: > > I have a grouping function based on what items are selected in a > multi-select widget. When the user presses a button, an ajax call is made > to a callback that ev

[web2py] Re: issue with multi-select widget

2012-03-30 Thread Derek
I'd say the most efficient is: if type(mylist).__name__='string': else etc etc.. On Friday, March 30, 2012 3:36:01 AM UTC-7, weheh wrote: > > I have a grouping function based on what items are selected in a > multi-select widget. When the user presses a button, an ajax call is made > to a callb