this is post #xx of the type: I get this warning, how can I fix this? It’s always the same, the type of a variable is unknown, so its properties are also unknown.
In your catch there is a jasperPluginException variable, that you one line further down ask for a property called message. The compiler does not know what TYPE jasperPluginException is. So declare the type and all is fine.
patrick:
this is post #xx of the type: I get this warning, how can I fix this? It’s always the same, the type of a variable is unknown, so its properties are also unknown.
Hi Patrick,
you are right! But I have read about the declarations in the Servoy Wiki and “Annotating JavaScript for the Closure Compiler”
on the Google Code site and have still problems to find the right declarations… I’m sorry.
Do you perhaps can give me some tips where I can find more infos about that? For example, the declaration @type {java.io.InputStream} is not an option in the valuelist for the @type declaration and I of course would like to learn how I can set the right declarations by myself without any help from the forum.
In general, what you need to do is figure out what kind of object you are dealing with and declare your variable with that type.
The example with the BufferedInputStream was a bit tricky, because that is plain Java. Expected was an InputStream and although your special InputStream was a subclass of InputStream it was not recognized as such. Not sure why, probably because we are not in Java here. What I did is 1) checked what the read() method expects and 2) declared that as type.