Hey everyone,
I am trying to use Google Desktop API -- Search API in a javascript
environment using JDeveloper and I am having trouble accessing
registrar.GetRegistrationInterface. It raises an error when it is
called. If I run the same code directly it works but when it runs in
the project I get an undefined error.
Here is the code: It raises the error right before the alert("2
cookie = ...) statement.
try {
// Instantiate the Google Desktop registrar component
alert("1.1 cookie = " + cookie);
var registrar = new ActiveXObject("GoogleDesktop.Registrar");
alert("2 cookie = " + cookie);
// Give it our ID and description
registrar.StartComponentRegistration(g_scriptSampleId,
componentDescription);
// Ask for the specific registration object that gives us Query
API access.
var regObj = registrar.GetRegistrationInterface
("GoogleDesktop.QueryRegistration");
// Now ask that registration object to give us a cookie
representing
// our Query API access. Note the read_only flag here; if false,
then
// we're asking for read-write access instead of just read-only.
cookie = regObj.RegisterPlugin(g_scriptSampleId, read_only);
alert("3 cookie = " + cookie);
// Now submit and hope the user will accept this component
// if not, then an error will be thrown
registrar.FinishComponentRegistration();
} catch (e) {
// We hit an error
message("Couldn't register the script samples.\n" + new String
(e.number) +
"\n" + e.description);
return 0;
}
What have missed or failed to include?
Thanks in advance.
Eric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---