I’m using the following to check if the desktop gadget is on a
Macintosh to disable some options:
Example 1:
function checkMac() {
var OS = framework.system.machine.manufacturer;
if (OS = "Apple") {
onMac = 1;
}
etc…
However, I’m also using this to send stats to my database:
Example 2:
options.putDefaultValue("operName",framework.runtime.osName);
I don’t have a Mac to test on. So I’m wondering if it’s working
correctly, I don’t know which one to stick with. According to this
(about Example 2):
http://code.google.com/apis/desktop/docs/gadget_apiref.html#framework.system
“The name of the computer's operating system (OS). Possible values:
"windows vista", "windows server 2003", "windows xp", or "windows
2000". If the OS doesn't fall into any of those categories, an empty
string is returned.”
In my database I do see a few empty strings, (from the Example 2) but
does the first example really return “Apple”. If not, my “on Mac” test
is not working.
As an extra note, the second example DOES also return Linux. I've had
a couple of those show up in my database.
PS- Anyone with a Mac and a few minutes- I’d be grateful if you could
run my gadget thru the hoops and see if all is well. If it is
correctly detecting the Mac system, browsing for custom background
images (Options - Backgrounds – Custom) should be disabled. You can
find my gadget at:
http://www.ezcandlesticks.com/lounge/modules.php?name=Google_Gadget_Pages
Cheers (and Thanks),
ezC
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---