On 17 Mrz., 16:00, Christian Biesinger <[EMAIL PROTECTED]> wrote:
> fi wrote:
> > I have loaded a XUL document in an iframe and try to change an
> > attribute of a label tag with the above mentioned method. I get the
> > error code 80530005 and (obviously) nothing changes.
>
> Hmm, that's NS_ERROR_DOM_INVALID_CHARACTER_ERR. Let me guess: You are on
> Linux and didn't use -fshort-wchar when compiling your code?

You >are< right, so thank you again! ...but there is a string
attached: I really want to use

element->SetAttribute(mAttribute, mValue)

where mAttribute and mValue are of type nsDependentString. This only
works if these Strings are not null-terminated. If they are, I get the
same error. I bind these strings using, e.g.

mAttribute.Rebind(PRUnichar*, int)

If I remember right, I read or inferred from something I read
somewhere that nsDependentString.Rebind requires the string to be null-
terminated. Otherwise it will to be copied internally. Is that so? I
want to avoid a copy of the strings. Currently my strings are null-
terminated, but I pass Rebind a length that excludes the '\0' -- this
at least works with SetAttribute.

-Andreas

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to