typedef nsString nsEmbedString; [http://lxr.mozilla.org/seamonkey/source/xpcom/string/public/nsEmbedString.h#48]
From the sample [http://lxr.mozilla.org/seamonkey/source/xpcom/sample/nsSample.cpp]
can you please check up constructing the nsEmbedString with PRUniChars.
something like
nsEmbedString attr(PRUnichar("src"));
--Gangadhar
Ning Michael-W0304C wrote:
I'm new to XPCOM. I need to pass an object of nsAString type as a method parameter. I have trouble initializing it. I tried:
#include "nsEmbedString.h"
NS_IMETHODIMP cxdmpl::Start()
{
nsEmbedString attr("src");
nsEmbedString value("c.jpg");
mElm->SetAttribute(attr, value);
return NS_OK;
}
But got:
No constructor could take the source type, or constructor overload resolution was ambiguous
I cast the string to char_type*, but got:
'char_type' : undeclared identifier
I spent hours for the simple task, where can I get information for Mozilla 1.6 XPCOM programming? The source code doesn't have a sample for my problem. Maybe I need a class other than nsEmbedString?
Thank you very much for any kind of help,
Michael
_______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
