Hi,

I want to capture an event leaving a page or closing the current window, I 
tried pyjamas.Window.addWindowCloseListener(), but it didn't work in pyjd 
(MS Windows). Following is an example.

from pyjamas import Window
class CloseHandler(object):
    def __init__(self):
        Window.addWindowCloseListener(self)
        Window.addWindowResizeListener(self)
    def onWindowClosed(self):
        Window.alert('in onWindowClosed()')
    def onWindowClosing(self):
        Window.alert('in onWindowClosing()')
    def onWindowResized(self, width, height):
        Window.alert('in onWindowResized()')

In the above example, the resize event is captured, but not the other 
events. I looked at DOM.py, ui/Event.py, and I found that window closing 
events were not defined. 


In pyjamas/Window.py, onClosed() and onClosing() are defined, but I cannot 
find pyjs source code calling them. Are they not implemented?
    
    in pyjamas/Window.py:

# TODO: call fireClosedAndCatch
def onClosed():
    fireClosedImpl()

# TODO: call fireClosingAndCatch
def onClosing():
    fireClosingImpl()


If they are not implemented, I want to implement it for MS Windows, but I 
don't know how to do it. Please give me advice if you know anything about 
it. 

Thanks in advance.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Pyjs.org Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to