Archived

This forum has been archived. Please start a new discussion on GitHub.

Object-Array

I'm trying to define an Object-Array in Slice like this:

sequence<Object> TourObject;

But that doesn't seem to work. Is there a possibility to define something like this? Untill now, I was just able to define sequences with basic types.

Thanks, Susanne

Comments

  • mes
    mes California
    Hi Susanne,

    Can you be more specific about what isn't working? The Slice snippet you quoted is legal, so without more information it will be difficult for us to help you.

    Regards,
    Mark
  • Inside my Ice-File, I have defined the following:

    module ApplicationLayer {
    ["java:type:java.util.LinkedList<Object>"]
    sequence<Object> TourObject;
    interface ApplicationLayerFunctions {
    string getMeteringPoint(string x);
    TourObject TourReading();
    };
    };

    I get an Error when I try to use slice2javae (IceEJ 1.2.0) saying: Tourobject cannot contain object-Values. I just want to generate a List that can contain Objects.
    I also tried:

    ["java:type:java.util.LinkedList"]
    sequence<Object> TourObject;

    But I get the same error.
  • when I use the slice2cppe-translator, everything works fine.
  • matthew
    matthew NL, Canada
    Ice-E 1.2 did not support objects-by-value. Ice-E 1.3 does. Unfortunately, Ice-E 1.3 no longer supports Java. However, why are you using Ice-E for java? Do you need the J2ME support? If not, you can use Ice 3.3.1 for the java side, as Ice-E and Ice and fully wire compatible.