[dojo-contributors] More defineWidget

Tom Trenka ttrenka at gmail.com
Mon Jun 5 11:32:46 EDT 2006


I've one comment, pretty minor:

re: optional renderer argument
The only thing that bugs me about this is the ordering of the parameter in
conjunction with the option of not including the param.  This is not so much
a code thing (as you make it a point to point out (heh) how things are being
detected) but a stylistic one; to date (iirc, and I could definitely be
wrong about this) I was under the impression that we were trying to keep
optional arguments at the end of a function signature, which would mean the
renderer argument would be shifted either to the end or before the props
argument (thereby helping eliminate confusion).  I don't think I wrote
anything about this in the Style guide and I'm fairly certain Alex dind't
add anything either, but either way it's a somewhat minor point.

---
I will say that I'm just sort of wishing that the whole widget definition
process wasn't so complex as to require a factory method like this; I
suppose that's less a comment and more of a commentary though.  It sort of
seems to me that instead of writing methods to mask the complexity of the
definition we might want to take a look at simplifying the infrastructure a
bit.

Tom

On 6/5/06, Alex Russell <alex at dojotoolkit.org> wrote:
>
> On Sunday 04 June 2006 10:00 pm, Scott J. Miles wrote:
> > >> we should think long and hard about changing the signature of
> >
> > defineWidget
> >
> > If it makes any difference, my implementation of the proposed changes
> > is backward compatible with the old signature.
>
> Objection rescinded. Lets make sure we put a dojo.deprecated() when
> using the old signature so that we can remove it in 0.5
>
> Regards
>
> --
> Alex Russell
> alex at dojotoolkit.org BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
>
>
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-contributors
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20060605/b98c89e9/attachment.htm 


More information about the dojo-contributors mailing list