[omniORB] Problem with sequence

Mikael Hallendal mikael.hallendal@euroseek.net
04 Dec 2000 14:17:46 +0100


Hello!

I'm new to this list so I don't know if this has been answered (I rechecked
the list to 2000-06 and didn't find any though).

If I create an idl with the following in it:

interface Foo {
        struct Bar {
                long  var1;
                long  var2;
        };

        typedef sequence<Bar> BarList;

        BarList GetBarList ();
};

how do I receive and use the BarList. I've tried:

     Foo::BarList *bars = foo_ptr->GetBarList ();
and
     Foo::BarList bars = foo_ptr->GetBarList ();
     Foo::Bar bar = bars[0];

but it doesn't work: I get compile errors like this:

     foobar.c:X: conversion from `Foo::BarList' to non-scalar type
    `Foo::Bar' requested 


So my question is. How do I use it?

Regards,
Mikael Hallendal

-- 

------------------------------------------------------------------------
Mikael Hallendal                Email: mikael.hallendal@euroseek.net
Software Engineer               Phone: +46-8-445 39 60
Search Engine Development       Fax:   +46-8-628 54 55
http://www.euroseek.com/        PGP: www.hallendal.net/~micke/mikhal.txt