在 2014年11月1日星期六UTC+8下午4时40分57秒,David Rajchenbach-Teller写道:
> I believe that the methods have migrated to
>
> http://dxr.mozilla.org/mozilla-central/source/dom/xslt/xpath/XPathResult.h?from=XPathResult#47
>
> Cheers,
> David
>
> On 01/11/14 08:43, [email protected] wrote:
> > Hi,
> >
> > Xulrunner 33.x is different from the former releases. I cannot compile my
> > C++ XPCOMs because the new interface of nsIDOMXPathResult has not the
> > methods to get the values.
> >
> > What should I do?
> > _______________________________________________
> > dev-platform mailing list
> > [email protected]
> > https://lists.mozilla.org/listinfo/dev-platform
> >
>
>
> --
> David Rajchenbach-Teller, PhD
> Performance Team, Mozilla
After I have included the header file XPathResult.h, one compilation error
appears as follows:
xulrunner-sdk-33.0\include\nsStringFwd.h(15): fatal error C1189: #error :
Internal string headers are not available from external-linkage code
My xpcom is coded as follows:
nsCOMPtr<nsISupports> results;
rv = oEvaluator->Evaluate(path, checkDom, nsnull,
nsIDOMXPathResult::BOOLEAN_TYPE, nsnull, getter_AddRefs(results));
if(NS_FAILED(rv)) {
...;
}
nsRefPtr<mozilla::dom::XPathResult> oResult = do_QueryObject(results);
if(oResult == nsnull) {
...
}
mozilla::ErrorResult errorResult;
bool boolVal = oResult->GetBooleanValue(errorResult);
if(errorResult.Failed()) {
...
}else if(!boolVal) {
...
}
The VC compiler tells me that the parameter "path" in the method Evaluate() can
not be casted from nsAutoString to const nsAString. I guess it was the cause of
the compilation error.
Am I wrong somewhere?
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform