codyopel / collide

Automatically exported from code.google.com/p/collide
Apache License 2.0
0 stars 0 forks source link

GWT DevMode in Firefox - JSNI Error #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am JavaScript exception in DevMode in Firefox (compiled and Chrome DevMode 
work fine).

I take it down to a line is register that, honestly I don't understand
    // Ghetto!
-->    handler.__unregisterRef = handlerWrapper;

Is there any other way of doing this so that FF DevMode is happy?

  @Override
  public final native void register(String address, MessageHandler handler) /*-{
    var handlerWrapper = function(message, replier) {
      handler.@com.google.collide.clientlibs.vertx.VertxBus.MessageHandler::onMessage(Ljava/lang/String;Lcom/google/collide/clientlibs/vertx/VertxBus$ReplySender;)
      (message.dto, replier)
    }

    // Ghetto!
    handler.__unregisterRef = handlerWrapper;
    this.registerHandler(address, handlerWrapper);
  }-*/;

Original issue reported on code.google.com by miller.garym on 10 Oct 2012 at 4:56

GoogleCodeExporter commented 9 years ago
I recommend using SuperDevMode.  

I'm working on a fork of collide which contains a SDM recompiler built into the 
product, and will be sending pull requests to master shortly.

If you would like to try out the recompiler, my fork is online @ 
https://github.com/WeTheInternet/collide

That fork is full of my learning curve on the project, and I will be committing 
all the gold to master as it is ready.  

Original comment by Ja...@wetheinter.net on 23 Aug 2013 at 5:59