Hello,

Such a simple Restlet/GWT application should work fine in both hosted and
compiled modes... It is possible that some code works in hosted mode and not
in compiled mode as the hosted on uses some emulation layer.

In order to debug this, could you send us a GWT project reproducing the
issue?

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-----Message d'origine-----
De : [email protected] [mailto:[email protected]] 
Envoyé : mercredi 12 août 2009 11:10
À : [email protected]
Objet : RE: RESTlet 2.0 M4 issues

(I posted this message yesterday and it wasn't accepted. If there is a
reason why this message is not appropriate for this forum can someone let me
know why)

Hi there,

I've tried the following code on both Windows and OSX using Restlet M4 and
the GWT distribution. Both work fine in hosted mode, but once I click
Compile/Browse and check it in IE or Firefox it stops working. In the
browsers it simply says "Getting..." and never receives a response.
Not sure if I'm doing something wrong, but I would imagine if it works in
hosted mode it *should* work in compiled mode. Perhaps Restlet GWT is using
some language construct or class that cannot be translated into javascript?

getButton.addClickHandler(new ClickHandler() {
  @Override
  public void onClick(ClickEvent event) {
    label.setText("Getting...");
    final Client client = new Client(Protocol.HTTP);

    client.get("/items", new Uniform() {
      @Override
      public void handle(Request request, Response response, Uniform
callback) {
        try {
          label.setText(response.getEntity().getText());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
    });
  }
});

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23828
32

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2386273

Reply via email to