Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#693 closed defect (invalid)

Issue with dojo.event.connect ordering of method calls

Reported by: anonymous Owned by: alex
Priority: high Milestone:
Component: General Version: 0.2
Keywords: Cc:
Blocked By: Blocking:

Description

I believe that there is a bug in dojo.event.connect when using after and around advice on the same method.

This may be a failure on my understanding, or a design decision for it to work this way, however I don't agree that the current implementation is correct.

I have attached a test html file.

In short :

dojo.debug('expect around-before, clicked, after, around-after'); dojo.debug('actual around-before, clicked, around-after, after'); var button1 = new Button(); dojo.event.connect('after', button1, 'onclick', afterHandler); dojo.event.connect('around', button1, 'onclick', aroundHandler); button1.onclick();

Attachments (1)

test_Events.htm (1.6 KB) - added by cameron@… 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by cameron@…

Attachment: test_Events.htm added

comment:1 Changed 14 years ago by anonymous

this should make it easier to read :

dojo.debug('expect around-before, clicked, after, around-after'); 
dojo.debug('actual around-before, clicked, around-after, after'); 
var button1 = new Button(); 
dojo.event.connect('after', button1, 'onclick', afterHandler); 
dojo.event.connect('around', button1, 'onclick', aroundHandler); 
button1.onclick();

comment:2 Changed 14 years ago by bill

Milestone: 0.4
Owner: changed from anonymous to alex

Alex?

comment:3 Changed 13 years ago by alex

Resolution: invalid
Status: newclosed

this is the as-deisgned behavior. If we're going to discuss if it should be changed, I'm ok with that, but perhaps in a separate enahancement bug?

Marking "invalid". Wish we had a less quarelsome tag for this kind of resolution...perhaps "under-documented" ;-)

comment:4 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.