Alberto Valverde wrote:
> Hi Michele,
>
> Great idea!  +1

Good to know! :-)

>
> I think we *should* make it automatic: 1) for boiler plate reduction.
> 2) for consistency 3) for documentation.
>
> This shouldn't be needed at update_data as they can always be fetched
> form the widget if needed.
>

Ok

> What we could even do is to wrap them in a proxy that prevented
> __setitem__ so we have another (thin) layer of protection from
> unthreadsafeness (child widgets should not be modified after
> init...), though this might be overkill and certainly not a high
> priority...
>

That can be done later also...

>
> I'm not so sure... I've been thinking lately in the "repeating
> widget" and I think we might need to change error_for, value_for and
> options_for  to pick up values form a list as well as from a dict
> because lists is how repeated widgets'  values/errors are stored by
> unpack_errors/NestedVariables and how options should be stored by us
> to keep the symmetry.
>
> What if instead of error_for("field") we just have error["field"]?
> This means that for repeating widgets we could have error[0], error
> [1]... __setitem__ will do it free for us I believe...
>
> Well, this is another topic, just introducing a "sneak preview" :)
>
> Nice job! :)
>

I think we should support RepeatingWidget but I'm contrary to yet again
rename the function we use, I've not a clear understanding of how
repeating widget work yet (never looked at them) so I can't see the
solution (I will look into them soon) but I would like to not change
again the philosophy we use, this means that error_for, value_for,
options_for should stay the same IHMO otherwise we need another change
to widget templates, also keep in mind that with my last update
error_for, value_for, options_for are able to work with a dotted
notation (a that's very important along with display_field_for), for
example:

error_for("sub.sub2.age"), value_for("sub.sub2.age")

and so on, if repeating widget should work with a list I can't see any
problem if error_for returns a list and you do:

error_for("sub.sub2.age")[0]

and so on.

I'm a bit worried that we should stop changing things around since
widget are getting more and more used by many people with 0.9a1 out.
;-)

My ideal scenario, once we finish with this thing (Compound) and
repeating widgets, is doing a feature freeze and documenting Widgets
really well, that's the only way to let user use them in the right way
and with all their potential. :-)

Thanks.

Ciao
Michele


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to