What other good alternatives to Qooxdoo

This cannot work. Take a look at the API of addNativeListener:
http://demo.qooxdoo.org/current/apiviewer/#qx.bom.Event~addNativeListener!method_public

The first argument passed has to be "any valid native event target". You are passing a qooxdoo-object. If something could maybe work, then passing ws.socket...

Anyway, I don't understand the purpose of what you are trying to do. I see no need for intercepting the events. You have the handlers in the code below, do whatever is needed within them.

If you are trying to fire qooxdoo events, have a closer look at the link you posted earlier:

http://simplapi.wordpress.com/2012/07/02/linking-socket-io-to-qooxdoo/

Like in lines 116 - 125 you could fire own events within each event-handler.


A little advice in the end: 
Don't use alert(), use console.log() instead. Alert() stops any further JavaScript-execution which can be confusion sometimes.

Cheers,
Andreas

________________________________________
Von: matteomasina [[hidden email]]
Gesendet: Montag, 9. September 2013 17:24
An: [hidden email]
Betreff: Re: [qooxdoo-devel] how to use or integrate socket in qooxdoo

Where I'm wrong ? I try to intercept the Event from Native object, but this
don't fire on message arrives.

var ws = new test.WebSocket();

qx.bom.Event.addNativeListener(ws,"message", function(e) {
                        alert("connessione aperta");
                        }, false);


/**
  * @ignore(WebSocket)
  */
 qx.Class.define("test.WebSocket",
 {
   extend : qx.core.Object,

   construct : function()
   {
     this.base(arguments);

     this.socket = new WebSocket('ws://127.0.0.1:3500/');

     // register native event-listeners
     this.socket.addEventListener("open", this.onSocketOpen , false);
     this.socket.addEventListener("message", this.onSocketMessage , false);
     this.socket.addEventListener("close", this.onSocketClose , false);
     this.socket.addEventListener("error", this.onSocketError , false);
   },

  events :
  {
    "reload" : "qx.event.type.Event",
    "post"   : "qx.event.type.Data"
  },


   members :
   {
     // holding the native WebSocket
     socket : null,

     // event-handlers
     onSocketOpen : function(e) {
       console.log("Connection opened");
     },

     onSocketMessage : function(e) {
       console.log("Message received: " + e.data);
       alert(e.data);
     },

     onSocketClose : function(e) {
       console.log("Connection closed");
     },

     onSocketError : function(e) {
       console.log("An error occured!");
     },

     send : function(message)
     {
       this.socket.send(message);
     }
   }
 });






--
View this message in context: http://qooxdoo.678.n2.nabble.com/how-to-use-or-integrate-socket-in-qooxdoo-tp7584526p7584588.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel