Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I read CFBundleShortVersionString in my widget?



That approach works, but now, you need to synchronize the version number in the plist, with that in your js file.


On May 25, 2005, at 4:17 PM, Micah Acinapura wrote:

Below is how I made my widget check for updates, no reading of the plist necessary, and if you put checkForUpdates in the onload functions of the body tag,  then the user doesn't ever have to hit update.

-micah

var req;
var versionNumber = 1;

function checkForUpdates() {
    req = new XMLHttpRequest();
    req.send(null);
    req.>
}

function processReqChange()
{
    if (req.readyState == 4)
    {
        if(req.responseText != versionNumber)  
        {
            widget.openURL('http://www.yourdomain.com/widgetpage/');
        }
    }
}


  Is it possible for me to read these in so that I can hit my website behind the scenes with an XMLHttpRequest and determine if the user has the latest version, when they hit an "Update?" button?  How would I get the values from the plist?

Thanks.
bp

 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Can I read CFBundleShortVersionString in my widget? (From: Micah Acinapura <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.