Closed kvinicki closed 3 years ago
Sorry, it was my bug
No problem, I'm glad to hear you are using it!
@kvinicki what was the bug exactly? I have a similar problem. The following demo doesn't work:
from ipywidgets import Label, HTML, HBox, Image, VBox, Box, HBox
from ipyevents import Event
from IPython.display import display
l = Label('Click or type on me!')
l.layout.border = '2px solid red'
h = HTML('Event info')
d = Event(source=l, watched_events=['click', 'keydown', 'mouseenter', 'touchmove'])
def handle_event(event):
print('a')
lines = ['{}: {}'.format(k, v) for k, v in event.items()]
content = '<br>'.join(lines)
h.value = content
d.on_dom_event(handle_event)
display(l, h)
If I remember correctly, I installed ipyevents with pip, abd i had to stsrt jupyter server again in order for it to work
On Tue, Nov 9, 2021, 13:30 Oleg Sinavski @.***> wrote:
@kvinicki https://github.com/kvinicki what was the bug exactly? I have a similar problem. The following demo doesn't work:
from ipywidgets import Label, HTML, HBox, Image, VBox, Box, HBox from ipyevents import Event from IPython.display import display l = Label('Click or type on me!') l.layout.border = '2px solid red'
h = HTML('Event info') d = Event(source=l, watched_events=['click', 'keydown', 'mouseenter', 'touchmove'])
def handle_event(event): print('a') lines = ['{}: {}'.format(k, v) for k, v in event.items()] content = '
'.join(lines) h.value = contentd.on_dom_event(handle_event)
display(l, h)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mwcraig/ipyevents/issues/58#issuecomment-964108469, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISF7EBP4W67XZOKGZMP4ODULEH67ANCNFSM4TH5XJ4A .
Feel free to reopen (or to open a new issue) if it isn't working for you @olegsinavski
Hi, I tried working with ipyevents widgets in a jupyter notebook that is running on a remote machine, but it doesn't react to DOM events. Can this problem be solved?