Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_Widget not converted #26

Open
mmaxwell opened this issue Apr 3, 2013 · 6 comments
Open

_Widget not converted #26

mmaxwell opened this issue Apr 3, 2013 · 6 comments
Labels

Comments

@mmaxwell
Copy link
Contributor

mmaxwell commented Apr 3, 2013

_Widget is not converted to dijit/_WidgetBase.

@brianarn
Copy link
Contributor

brianarn commented Apr 4, 2013

This sort of conversion seems like it may potentially be unsafe, given that _Widget brings in some of the automatic onClick etc camelcased DOM events. Does seem like it might be a good idea to issue some sort of notice/warning when using _Widget (or _Templated) though.

@mmaxwell
Copy link
Contributor Author

mmaxwell commented Apr 4, 2013

In the source of _Widget, it states "Old base class for widgets. New widgets should extend dijit/_WidgetBase instead". If the goal of this tool is to help in converting from older versions of dojo to 2.0, it seems like this should be what we want to do.

@kfranqueiro
Copy link

In this case it's not about moving forward, it's about not breaking existing code. As Brian stated, _Widget contains stuff that _WidgetBase does not, so upconverting from _Widget to _WidgetBase might cause regressions in people's code.

@brianarn
Copy link
Contributor

brianarn commented Apr 4, 2013

I do like the idea of having some sort of flag or way to issue a warning, though, as a handy tip.

@wkeese
Copy link

wkeese commented Apr 6, 2013

FYI, conversion of _Widget to _WidgetBase is pretty complicated:

  • Besides _WidgetBase you may need to pull in other mixins, ex: _CssStateMixin. Hard to analyze which of those mixins a _Widget subclass is depending on.
  • Need to upgrade usage of old API's like this.connect(...) to this.own(on(...)).

Ideally you could do the conversion but it's a lot of work.

@mmaxwell
Copy link
Contributor Author

mmaxwell commented Apr 6, 2013

I believe we are holding off on this piece until _Widget goes away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants