- Timestamp:
- Jun 30, 2010 4:15:55 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63241
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r30516 r30533 432 432 433 433 def monitorSource(ctx, es, active, dur): 434 def handleEventImpl(ev): 435 print "got event: %s %s" %(ev,str(ev.type))434 def handleEventImpl(ev): 435 print "got event: %s" %(str(ev.type)) 436 436 if ev.type == ctx['global'].constants.VBoxEventType_OnMachineStateChange: 437 437 scev = ctx['global'].queryInterface(ev, 'IMachineStateChangeEvent') … … 444 444 445 445 def handleEvent(self, ev): 446 handleEventImpl(ev) 447 446 try: 447 # a bit convoluted QI to make it work with MS COM 448 handleEventImpl(ctx['global'].queryInterface(ev, 'IEvent')) 449 except: 450 traceback.print_exc() 451 pass 452 448 453 if active: 449 454 listener = ctx['global'].createListener(EventListener) -
trunk/src/VBox/Main/glue/vboxapi.py
r30492 r30533 295 295 str += " HandleEvent=BaseClass.handleEvent\n" 296 296 str += " def __init__(self): BaseClass.__init__(self, arg)\n" 297 str += "result = ListenerImpl()\n"297 str += "result = win32com.server.util.wrap(ListenerImpl())\n" 298 298 exec (str,d,d) 299 299 return d['result']
Note:
See TracChangeset
for help on using the changeset viewer.