[Dojo-interest] event.disconnect not working help!

Keith Chadwick keith at allianceevents.com
Mon Feb 26 12:11:29 MST 2007


loosing my mind here why is the below not working:

where smSmartTable is a DIV object and I am tracking the mouse x position to
keep another object in line.

            var resizeObject=new Number()
            function resize(evt){
                resizeObject=evt.currentTarget.ordinal
                dojo.event.connect(smSmartTable,'onmousemove',resizeMove)
                dojo.event.connect(smSmartTable,'onclick',resizeEnd)
            }
            
            function resizeEnd(evt){
                dojo.event.disconnect(smSmartTable,'onmousemove',resizeMove)
                dojo.event.disconnect(smSmartTable,'onclick',resizeEnd)     
            }
            
            function resizeMove(evts){
                columns[resizeObject].resizeObj.style.left=evts.pageX + 'px'
            }

Everything works except that the the resizeEnd is being called but in
continues to work as if the events are still connected, in other words keeps
calling resizeMove.

Cheers
Keith
-- 
View this message in context: http://www.nabble.com/event.disconnect-not-working-help%21-tf3295213.html#a9166724
Sent from the Dojo mailing list archive at Nabble.com.



More information about the Dojo-interest mailing list