[Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
Hello, I'm trying to compress XML data being exchanged via Socket with a Perl backend and after taking several hurdles, I'm stuck at this error message: 1061: Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray. My code is:

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Dave Watts
I'm trying to compress XML data being exchanged via Socket with a Perl backend and after taking several hurdles, I'm stuck at this error message:    1061: Call to a possibly undefined method inflate through    a reference with static type flash.utils:ByteArray. In your code, if there's

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
On Sun, Oct 3, 2010 at 6:27 PM, Dave Watts dwa...@figleaf.com wrote: In your code, if there's nothing to read, your exception handlers fall through after calling handleTcpError. At compile time, the compiler has no guarantee that there'll be anything in the byte array. Thanks Dave, you're

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
I've even added 2 checks for the _nbytes being 0 and a check for _bytes != null and still it fails with 1061: Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray. (ok, I understand that by static compiler means _bytes being null) My

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Henrik Andersson
Dave Watts skriver: I'm trying to compress XML data being exchanged via Socket with a Perl backend and after taking several hurdles, I'm stuck at this error message: 1061: Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray. In your

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
On Sun, Oct 3, 2010 at 7:44 PM, Henrik Andersson he...@henke37.cjb.net wrote: Dave Watts skriver: In your code, if there's nothing to read, your exception handlers fall through after calling handleTcpError. At compile time, the compiler has no guarantee that there'll be anything in the byte

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Tom Gooding
It looks to me like your compiler error is due to a call to _bytes.inflate() where the compiler detects that inflate() is not a method of the ByteArray class, I think it was added in later player versions - check your publish settings? older docs (missing):

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Alexander Farber
Bingo, Tom - On Sun, Oct 3, 2010 at 8:14 PM, Tom Gooding t...@quickthinkmedia.co.uk wrote: It looks to me like your compiler error is due to a call to _bytes.inflate() where the compiler detects that inflate() is not a method of the ByteArray class, I think it was added in later player

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Henrik Andersson
Alexander Farber skriver: On Sun, Oct 3, 2010 at 7:44 PM, Henrik Anderssonhe...@henke37.cjb.net wrote: Dave Watts skriver: In your code, if there's nothing to read, your exception handlers fall through after calling handleTcpError. At compile time, the compiler has no guarantee that there'll

Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Dave Watts
No, I think Dave has a valid point - if my ByteArray _bytes is null - because a socket read has thrown an exception, then the compiler might be able to recognize it (same is in Java). The compiler does not know that an exception has been thrown. That's runtime events. Exceptions are not