Hi Ted,

from my experiences you are missing two steps:

1) in file WebSocket.java I had to change a bit implementation of
native method 'create' and 'isSupported' (remove alerts when you know
it's working properly):
  public static native WebSocketImpl create(WebSocket client, String
server)
        /*-{
        var ws = null;
        if (!!window.WebSocket) {
            alert('starting native web sockets...');
            ws = new WebSocket(server);
        } else if (!!$wnd.WebSocket) {
            alert('starting flash simulation of web sockets...');
            ws = new $wnd.WebSocket(server);
        }
        ws.onopen = $entry(function() {
          [email protected]::onOpen()
();
        });
        ws.onmessage = $entry(function(response) {
 
[email protected]::onMessage(Ljava/
lang/String;)(response.data);
        });
        ws.onclose = $entry(function() {
          [email protected]::onClose()
();
        });
        return ws;
        }-*/;

   public static native boolean isSupported()
        /*-{
        return (!!window.WebSocket || !!$wnd.WebSocket);
        }-*/;


2) for flash 9 you also have to handle socket policy as described in
http://github.com/gimite/web-socket-js#readme. Follow instructions in
http://www.lightsphere.com/dev/articles/flash_socket_policy.html and
you should be able to make it work.




On Jun 10, 3:52 pm, Tad Glines <[email protected]> wrote:
> I was unable to get web-socket-js working with Firefox. Flash is installed.
>
> I placed the .js and swf files in the "war" dir and modified the
> simplewebclient.html adding:
>   <script type="text/javascript" src="swfobject.js"></script>
>   <script type="text/javascript" src="FABridge.js"></script>
>   <script type="text/javascript" src="web_socket.js"></script>
>   <script type="text/javascript">
>
>     // Set URL of your WebSocketMain.swf here:
>     WebSocket.__swfLocation = "WebSocketMain.swf";
>   </script>
>
> before the line:
>
>     <script type="text/javascript" language="javascript"
> src="simplewebclient/simplewebclient.nocache.js"></script>
>
> Have I missed something fundamental?
>
> -Tad
>
> On Thu, May 27, 2010 at 12:42 AM, Anthony Baxter 
> <[email protected]>wrote:
>
>
>
> > It needs websocket support for the underlying network transport. I
> > believe the editor widget itself is pretty compatible as far as
> > browsers. As I mentioned on the office hours wave, it should be
> > possible to get running under firefox and other non-websocket browsers
> > usinghttp://github.com/gimite/web-socket-js#readme
>
> > Note also that the current compile_gwt target only builds the
> > chrome/webkit version of the JS. You'll need to edit the build
> > configuration to build other versions for browsers other than
> > chrome/webkit.
>
> > Anthony
>
> > On Thu, May 27, 2010 at 17:36, Guillermo Rauch <[email protected]> wrote:
> > > The copy/paste handler is beautiful! Lots of gems in that editor. What's
> > the
> > > browser compatibility like? (besides Safari/Firefox)
> > > --
> > > Guillermo Rauch
> > >http://devthought.com
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Wave Protocol" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<wave-protocol%2bunsubscr...@goog­legroups.com>
> > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/wave-protocol?hl=en.
>
> > --
> > Anthony Baxter, [email protected]
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Wave Protocol" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<wave-protocol%2bunsubscr...@goog­legroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/wave-protocol?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Wave 
Protocol" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/wave-protocol?hl=en.

Reply via email to