On 25 avr, 16:54, otakuj462 <[email protected]> wrote:
> Hi,
>
> I'm quite new to GWT, and I'm trying to diagnose the source of some
> compilation errors for an existing open source project that leverages
> GWT (incidentally, for my Google Summer of Code project). Without
> going into the details of the purpose of the application, I was hoping
> someone could offer some general guidance as to why these particular
> errors might be occuring.
>
> The errors occur when attempting to compile certain method calls on
> instances of class OutputStream. So, for example:
>
>         [java]    [ERROR] Errors in 'file:/C:/workspace-gsoc/
> org.eclipse.swt.e4.jcl/src/gwt/extended/javascript/java/io/
> OutputStreamWriter.java'
>         [java]       [ERROR] Line 31: The method close() is undefined
> for the type OutputStream
>         [java]       [ERROR] Line 42: The method flush() is undefined
> for the type OutputStream
>         [java]       [ERROR] Line 56: The method write(byte[], int,
> int) is undefined for the type OutputStream
>
> This is on GWT 1.5. I also tried it on GWT 1.6, and I believe it threw
> the same error. I know that on GWT 1.6, OutputStream is emulated
> [http://code.google.com/webtoolkit/doc/1.6/RefJreEmulation.html], but
> I'm not sure about 1.5.

As the doc says, no method is emulated on OutputStream, only the
(default) constructor:
http://code.google.com/p/google-web-toolkit/source/browse/releases/1.6/user/super/com/google/gwt/emul/java/io/OutputStream.java

Actually OutputStream is only there to support System.out.print()/
println(), so that you could use it in your code and get it compiled
to a no-op in JavaScript, without compile error.

> I'd appreciate any guidance anyone can offer.

Provide your own OutputStream emulation (and make sure it is picked in
place of the one packaged within GWT)

For instance, this is the emulated OutputStream for an Adobe AIR
environment:
http://code.google.com/p/gwt-in-the-air/source/browse/trunk/super/net/ltgt/gwt/air/emul/java/io/OutputStream.java

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to