[omniORB] sequence of string question

V Jovanovic canontriplex@yahoo.com
Sat, 22 Dec 2001 07:59:49 -0800 (PST)


yes of course "new" was missing, but that was typo ...

Anyhow, I resolved the problem. Originally I had a
statement in my code like

f->FeatNames[0] =
CORBA::string_dup(some_STL_string.c_str());

where some_STL_sting was a string resulted form STL
library, apparently this makes a difference. 
CORBA::string_dup doesn't work well on this input.  I
then changed the statement to be 

f->FeatNames[0] = (const char *)
some_STL_string.c_str();

forcing a deep copy and everything was  OK with that.

At the time of my being puzzled I didn't know that all
of this makes any difference and that is why I posted
a question to the group with the statement

f->FeatNames[0] = CORBA::string_dup("test0");

which of course must work and it does.

Vin



--- Carl Thompson <cet@carlthompson.net> wrote:
> On Thu, 2001-12-20 at 15:27, V Jovanovic wrote:
> 
> > ...
> 
> > Then in the server I do
> >  
> > cad_server::FtIdNm_var f = 
> >                cad_server::FtIdNm;
> 
> Are you sure this is what you're doing here? 
> Perhaps this should be
> 
>   cad_server::FtIdNm_var f = 
>                  new cad_server::FtIdNm;
>                  ^^^^
> 
> > ...
> 
> Carl Thompson
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com