When is public version of Oxygene for Java (5.0.31.991) going to be updated?

I was wondering when the public version of Oxygene for Java is being updated?

I have been using this version, and it is very frustrating that the Oxidizer (Java, Delphi -> Oxygene) just doesn’t work - pastes in errors instead (In my humble opinion, this is souring a very good product!).

Also, when is Oxygene for Java going to support multi-dimensional arrays just like Java can?

cheers,
Paul

The new version of Oxygene should be due at the end of the month.

arrays of arrays are supported already though, which is what (int[][]) in java is, an array of an array:

var x: array of array of Integer;

@Paulnicholls: are all the j2pas issues you found reported?

Whatever pascal sample code I copy to clipboard and use Oxidizer->Paste Delphi as Oxygene, I get conversion error : “Object reference not set to an instance of an object”.

The new version of Oxygene should be due at the end of the month.

Ok, cool…thanks Carlo :slight_smile:

arrays of arrays are supported already though, which is what (int[][]) in java is, an array of an array:

var x: array of array of Integer;

Ah! I hadn’t tried that [does facepalm]!

So how to I assign the array x’s sizes for each dimension then?
I tried this:

  x: array of array of Integer;
begin
  x := new Integer[5][10];

and got this error:

Error	1	(E62) Type mismatch, cannot assign "array of RemObjects.Oxygene.System.Integer" to "array of array of RemObjects.Oxygene.System.Integer"	C:\Shared\My Dropbox\Oxygene for java\projects\platformation\platformation\game_main.pas	187	8	platformation
Whatever pascal sample code I copy to clipboard and use Oxidizer->Paste Delphi as Oxygene, I get conversion error : "Object reference not set to an instance of an object".

I get exactly the same error.

Also, when I try using Oxidizer with Java code, for example the text below:

InputStream in = new FileInputStream("white_pixel.png");
try {
   PNGDecoder decoder = new PNGDecoder(in);

   System.out.println("width="+decoder.getWidth());
   System.out.println("height="+decoder.getHeight());

   ByteBuffer buf = ByteBuffer.allocateDirect(4*decoder.getWidth()*decoder.getHeight());
   decoder.decode(buf, decoder.getWidth()*4, Format.RGBA);
   buf.flip();

   while(buf.hasRemaining()) {
      System.out.printf("%02X\n", buf.get() & 255);
   }
} finally {
   in.close();
}

I get this text

// 20:1 Closing parenthesis expected
// 20:1 Semicolon expected
var in: InputStream := new FileInputStream('white_pixel.png');

Another Java to Oxygen conversion example:

try {
    // Set up destination attribute
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(new Destination(new java.net.URI("file:e:/temp/out.ps")));

    // Print it
    job.print(doc, aset);
} catch (PrintException e) {
} catch (java.net.URISyntaxException e) {
}

Oxygene output:

try
  //  Set up destination attribute
  var aset: PrintRequestAttributeSet := new HashPrintRequestAttributeSet();
  aset.&add(new Destination(new java.net.URI('file:e:/temp/out.ps')));
  //  Print it
  job.print(doc, aset);
except
  on e: PrintException do
  begin
  end 

;
  on e: URISyntaxException do
  begin
  end 

end ;

What’s with the extra line feeds (after “end”) and the ampersands “&”?

:slight_smile:

The extra line feeds between end and ; I reported and it’s been fixed.

The & turns a (possibly partially) reserved word into an identifier.

paulnicholls said: I get exactly the same error.
does this persist with the latest beta? i know that vika has been fixing Oxidizer issues like crazy the past weeks.

I haven’t tried the latest beta, only the public version…

k, pls do. the latest actually is a gamma and should be stable.

@mh: Ok, I have downloaded the gamma version (5.1.34.1015)…should I uninstall the public version of Oxygene (5.0.31.991) first or just install over the top of it?

@paulnicholls:
I think the best approach is uninstalling old version first and installing the new version after it (though I know that you can simply install Oxygene on the top of older version and it will work). Though Marc knows better about it.

As for Oxidizer issues, I tested them now:

InputStream in = new FileInputStream("white_pixel.png");
try {
   PNGDecoder decoder = new PNGDecoder(in);
 
   System.out.println("width="+decoder.getWidth());
   System.out.println("height="+decoder.getHeight());
 
   ByteBuffer buf = ByteBuffer.allocateDirect(4*decoder.getWidth()*decoder.getHeight());
   decoder.decode(buf, decoder.getWidth()*4, Format.RGBA);
   buf.flip();
 
   while(buf.hasRemaining()) {
      System.out.printf("%02X\n", buf.get() & 255);
   }
} finally {
   in.close();
}

converts wrong. It creates incorrect finally block and adds extra space after the end keyword. I have logged an issue for it (#55793).

try {
    // Set up destination attribute
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(new Destination(new java.net.URI("file:e:/temp/out.ps")));
 
    // Print it
    job.print(doc, aset);
} catch (PrintException e) {
} catch (java.net.URISyntaxException e) {
}

There are still some extra lines and extra spaces left (#55794).

Best regards.

Thanks Marc and Vika, I will uninstall the public version and see how I go :slight_smile:
Thanks for the great product!!

fwiw, all our releases are ALWAYS safe to just update. yo never have to uninstall.

Thanks Marc :slight_smile: