Opened 11 years ago
Closed 9 years ago
#10217 closed defect (wontfix)
dojo.connectPublisher simplification
Reported by: | Les | Owned by: | dante |
---|---|---|---|
Priority: | low | Milestone: | future |
Component: | Events | Version: | 1.4.0b |
Keywords: | dojo.connectPublisher needsreview | Cc: | James Burke, alex, elatzukin |
Blocked By: | Blocking: |
Description
I believe the dojo.connectPublisher function can be simplified. This is because the event param is not optional according to the inline doc. If it is optional, then the doc should be corrected.
dojo.connectPublisher = function( /*String*/ topic, /*Object|null*/ obj, /*String*/ event){ var pf = function(){ dojo.publish(topic, arguments); }; return dojo.connect(obj, event, pf); //Handle };
Change History (7)
comment:1 Changed 11 years ago by
Milestone: | tbd → 1.5 |
---|---|
Owner: | changed from anonymous to dante |
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Milestone: | 1.5 → 1.6 |
---|
moving this to 1.6 ... 1.5 is expected soon, and changing this _may_ be an API change, and i'm simply missing the use case.
comment:4 Changed 11 years ago by
Cc: | alex elatzukin added |
---|
comment:5 Changed 10 years ago by
Milestone: | 1.6 → future |
---|
comment:6 Changed 9 years ago by
Keywords: | needsreview added |
---|---|
Priority: | high → low |
comment:7 Changed 9 years ago by
Component: | Core → Events |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
dojo.connectPublisher() is in _base/connect.js, which implies that it's deprecated and will be removed in 2.0.
Note: See
TracTickets for help on using
tickets.
so there isn't a test in place showing why one would ever use connectPublisher without an event. I tried to test this functionality, which I assume to be:
though the subscription is never fired. I attempted also var cb = function(){} ... nothing seemed to publish on that topic.