[Gambas-devel] Re: QMap<QString,QString> my implementation in DCOP class file.

Carlo Sorda csorda at ...69...
Wed Mar 2 12:47:44 CET 2005


>
>By comparing with other similar datatype, I think a
>'GB.ReturnObject(aCollection)' is missing...
>
>Regards,

Thanks for your answer, but I think the problem is not in GB.ReturnObject, 
becouse the error appear when
GB.Collection.Set(aCollection,(const char*)&aKey,0,&aValue) is called!!

In fact I implemented this method using GB_ARRAY of GB_STRING like this and 
there is not error appear!!!

...
//{ "QMap<QString,QString>", (GB_TYPE)"Collection" },
{ "QMap<QString,QString>", (GB_TYPE)"String[]" },
...
...
And into method:

else if (type == QT_T_QMAP_QSTRING)
{
GB_ARRAY array;
...
n = r.count();
GB.Array.New(&array,GB_Y_STRING,n);

for (it = r.begin();it!=r.end();i++)
         GB.NewString((char **)GB_Array.Get(array,i++),it.key().utf8.data(),0);
...
GB.ReturnObject(array);

In this case there isn't error!!!
Is there a problem in Collection's Set method! I Hope not!
Thanks in advance, see you soon, Carlo. 





More information about the Devel mailing list