Using HTTPSocket to download a file
Issue: 9.2 (January/February 2011)
Author: Marc Zeedar editor-at-rbdeveloper.com
Article Description: No description available.
Article Length (in bytes): 5,989
Starting Page Number: 71
RBD Number: 9210
9210project.zip Updated: Thursday, January 6, 2011 at 11:15 AM
Related Link(s): None
Known Limitations: None
Excerpt of article text...
A few years ago I wrote a simple application updater (see "Update Yourself" in RBD 3.3) that allows your app to check with your website to see if there's a new version of the app available. The code still works but is a little dated, so I thought I'd update it.
Though not the most powerful, my self-updater is simple, and one of the nice things about it is that all the code fits into a single window object you can drag into any REAL Studio project (there are no dependencies on other objects or classes).
One drawback, however, is that it has traditionally simply passed the application download process to the user's default web browser. Since that download process can happen in the background, this can confuse users who aren't aware that something is happening. I've had reports of my users downloading a file multiple times because they didn't realize it had already downloaded. To fix this, I decided to modify my code to download the file directly.
By the way, if you aren't familiar with my original article, either go to the back issue and read up on it, or read my quick summary in the "Self-Updater Refresher" sidebar within this article. You may find it will help you follow things better.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.