"Michele Cella" <[EMAIL PROTECTED]> writes:
> Jorge Godoy wrote:
>> "Michele Cella" <[EMAIL PROTECTED]> writes:
>>
>> > Can you try this one?
>> >
>> > http://trac.turbogears.org/turbogears/attachment/ticket/654/autocomplete.patch
>>
>> Still not there:
>>
>
> Damn, am I stupid!? :D
Ah... Rethorical questions... /me runs really fast and hides...
> I've the system messed up ATM (breezy->dapper) so I can't test it,
(I swear I read diaper... :-D)
> sorry for sending two bad patches, anyway do it this way:
>
> turbogears/ # svn revert -R
> turbogears/ # patch -p0 < the.patch
>
> patch attached to the same ticket as before.
First, is my test code correct? :-) If it is, we'll need take3. ;-)
================================================================================
#!/usr/bin/python
from turbogears import widgets
from turbogears import validators
form = widgets.TableForm(fields = [
widgets.AutoCompleteField(name='metodologia',
search_controller="/analises/search_metodologia",
search_param="metodologia",
result_name="metodologias",
text_field = widgets.TextField(attrs = {'size':51},
name = "text",
label = u'Metodologia',
css_classes = ['required'],
validator = validators.UnicodeString(not_empty = True),
),
)])
form.render()
================================================================================
And here's the traceback:
================================================================================
Traceback (most recent call last):
File "tempo.py", line 17, in ?
form.render(text_field = dict(attrs = {'size': 51}))
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/base.py",
line 192, in render
elem = self.display(value, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/base.py",
line 41, in lockwidget
output = self.__class__.display(self, *args, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/base.py",
line 369, in display
convert,
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/base.py",
line 81, in _update_path
returnval = func(self, *args, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/base.py",
line 264, in display
return view.transform(template_vars, template=self.template_c)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/view/base.py",
line 67, in transform
return engine.transform(info, template)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/plugins/kid/turbokid/kidsupport.py",
line 128, in transform
return ElementStream(t.transform()).expand()
File "/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/pull.py", line
95, in expand
for ev, item in self._iter:
File "/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/pull.py", line
164, in _track
for p in stream:
File "/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/filter.py", line
21, in transform_filter
for ev, item in apply_matches(stream, template, templates, apply_func):
File "/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/filter.py", line
25, in apply_matches
for ev, item in stream:
File "/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/pull.py", line
164, in _track
for p in stream:
File "/usr/lib/python2.4/site-packages/kid-0.9-py2.4.egg/kid/pull.py", line
206, in _coalesce
for ev, item in stream:
File "<string>", line 66, in _pull
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/base.py",
line 41, in lockwidget
output = self.__class__.display(self, *args, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/base.py",
line 369, in display
convert,
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/base.py",
line 81, in _update_path
returnval = func(self, *args, **kw)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/base.py",
line 263, in display
self.update_data(template_vars)
File
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/big_widgets.py",
line 117, in update_data
super(AutoCompleteDesc, self).update_data(d)
TypeError: super(type, obj): obj must be an instance or subtype of type
================================================================================
Thanks! :-)
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-trunk
-~----------~----~----~----~------~----~------~--~---