I am keeping on experimenting... Next attempt for the trunk playground: var win = new qx.bom.Window.open(); win.document.write("<html><body /></html>"); win.document.close();
var root = new qx.ui.root.Application(win.document); // Create a button var button1 = new qx.ui.form.Button("First Button", "icon/22/apps/internet-web-browser.png"); // Add button to document at fixed coordinates root.add(button1, { left : 100, top : 50 }); // Add an event listener button1.addListener("execute", function(e) { alert("Hello World!"); }); // the event manager for the button is still attached // to the main window this.info( qx.event.Registration.getManager(button1) == qx.event.Registration.getManager(root) ); // result: true // get listeners and remove them var listeners = qx.event.Registration.getManager(button1).serializeListeners(button1); qx.event.Registration.getManager(button1).removeAllListeners(button1); // import them to the manager of the new window // doesn't work qx.event.Registration.getManager(win).importListeners(button1,listeners); I get an error "There is no event handler for the event 'undefined' on target 'qx.ui.form.Button'!" Is there a way of switching the event manager for an individual widget? Thanks, Christian panyasan wrote: > > Hi Thomas, > > it's here: > > http://bugzilla.qooxdoo.org/show_bug.cgi?id=1157 > > I am adding a link to this thread there. > > Thanks, > > Christian > > > thron7-2 wrote: >> >> Just a remark: Nothing much happens in core development without a bug. >> Did you create a bug for this issue, or is there an existing bug?! >> >> T. >> >> panyasan wrote: >>> Hi Fabian, >>> >>> >>> panyasan wrote: >>> >>>> I've done some experimenting but have to admit that I don't know enough >>>> about the event dispatch process in order to create patches that would >>>> allow remapping the events to the new window. Would it be possible to >>>> explain in a few sentences or maybe even a small graph how the current >>>> system of abstracting the "real" browser events works? I guess any >>>> solution that does not imply rewriting the event system from scratch >>>> must >>>> be based on unregistering the attached events from one window and >>>> reattaching them in the context of the new window. >>>> >>>> >>> >>> I know this has low priority for the qx devs, but I'd humbly like to ask >>> if >>> you would see a chance of implementing native window support as I >>> outlined. >>> I know about >>> >>> http://qooxdoo.org/documentation/0.8/event_layer_impl >>> >>> but this document doesn't really help me solve the issue. Would there be >>> a >>> way withhin the current Framework to remap events to a different >>> document? I >>> am thinking of the follwoing pseudo-code >>> >>> qx.event.Manager.getAllListeners().forEach( function( el, type, >>> listener, >>> useCapture ) { >>> if ( x.y.getWindow(el) === nativeWindow ){ >>> // removing and re-adding should fix the listeners that have been >>> attached to the >>> // main window before the widget elements were added to the DOM of >>> the >>> new native >>> // window >>> eventManager.removeListener( el, type, listener, useCapture ) >>> eventManager.addListener( el, type, listener, useCapture ); >>> },this); >>> >>> Do you think somthing like this might work? >>> >>> Cheers, >>> >>> Christian >>> >>> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and >> focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> qooxdoo-devel mailing list >> qooxdoo-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> >> > > -- View this message in context: http://n2.nabble.com/Native-Window-again-tp3723200p4032871.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel