Hi everyone,
I use wxMozilla (for wxWidgets) and it works with GRE from Firefox
1.0.8. I'm using VC2003 and XP.
I'm trying to update wxMozilla to use it with Firefox 1.5.7 but there
are severals errors :
rv = nsComponentManager::RegisterFactory(kPromptServiceCID,
"Prompt Service",
"@mozilla.org/embedcomp/prompt-service;1",
promptFactory,
PR_TRUE); // replace existing
In /mozilla/embeddings/test/wxEmbed, I've found
nsCOMPtr<nsIComponentRegistrar> registrar;
NS_GetComponentRegistrar(getter_AddRefs(registrar));
if (registrar)
registrar->RegisterFactory(cid, aDescription,
contractID.get(),
factory);
I don't know if the 5th argument needs more code
I've also problems with APIs :
GetChromeEventHandler :
nsCOMPtr<nsPIDOMWindow> piWin(do_QueryInterface(rootWindow));
nsCOMPtr<nsIChromeEventHandler> chromeHandler;
piWin->GetChromeEventHandler(getter_AddRefs(chromeHandler));
> 'nsPIDOMWindow::GetChromeEventHandler' : function does not take 1 arguments
//This code lets us handle mouse events generated by Mozilla
nsCOMPtr<nsPIDOMWindow> domWindowPrivate =
do_QueryInterface(domWindow);
// and the root window for that DOM window
nsCOMPtr<nsIDOMWindowInternal> rootWindow;
domWindowPrivate->GetPrivateRoot( getter_AddRefs(rootWindow) );
> 'nsPIDOMWindow::GetPrivateRoot' : function does not take 1 arguments
And finally,
nsresult rv =
nsComponentManager::CreateInstance(NS_SIMPLEURI_CONTRACTID, nsnull,
NS_GET_IID(nsIURI), (void**)&url);
wxASSERT_MSG(NS_SUCCEEDED(rv), wxT("Could not create an instance of
the url"));
rv = url->SetSpec(nsCAutoString(utf8_buffer));
I've tried to convert to use nsIComponentRegistrar :
nsCOMPtr<nsIComponentRegistrar> compReg;
nsresult rv = NS_GetComponentRegistrar(getter_AddRefs(compReg));
rv = compReg->CreateInstance(NS_SIMPLEURI_CONTRACTID, nsnull,
NS_GET_IID(nsIURI), (void**)&url);
wxASSERT_MSG(NS_SUCCEEDED(rv), wxT("Could not create an instance of the
url"));
rv = url->SetSpec(nsCAutoString(utf8_buffer));
> 'CreateInstance' : is not a member of 'nsDerivedSafe<T>'
maybe i have to use do_Create instead of CreateInstance ?
At least, I've also set MOZILLA_INTERNAL_API because wxMozilla seem to
use old api for string.
Sorry, for this long post
If somebody can help or provide somes links for doc
Excuse me if I've posted to wrong newsgroup.
Thanks,
Michael
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom