Changes between Version 1 and Version 2 of Ticket #16576, comment 17


Ignore:
Timestamp:
Feb 20, 2013, 8:05:45 AM (7 years ago)
Author:
Nick Fenwick
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16576, comment 17

    v1 v2  
    1 comment retracted.. the code committed to trunk isn't the same as the version I'm working with locally.  I'll look into it some more.
     1I think I've found a serious problem with this patch.  The line in _TemplatedMixin used to be:
     2
     3
     4{{{
     5this._attachEvents.push(this.connect(baseNode, touch[event] || event, thisFunc));
     6}}}
     7
     8
     9I've noticed that `dijit/Dialog` close buttons no longer work, and they relied on `ondijitclick` events, which use `_OnDijitClickMixin` which overrides `connect()` for dijits.  This code in `_AttachMixin` now uses the line:
     10
     11
     12{{{
     13this._attachEvents.push(this.own(on(baseNode, event, lang.hitch(_attachScope, thisFunc)))[0]);
     14}}}
     15
     16
     17This no longer uses this.connect and so the `ondijitclick` events fail.
     18
     19The problem with using this.connect was that it calls into `_WidgetBase::connect` where 'this' is hardcoded as the scope::
     20
     21{{{
     22return this.own(connect.connect(obj, event, this, method))[0];  // handle
     23}}}
     24
     25We need to use `this.attachScope` at that point.