Articles 3D Audio Custom Controls General RB Graphics Hacks Mac OS X Menus Novelty Printing REALbasic 2005 REALbasic 2006 Registration Resources Reviews Serial Speech Sockets XML Video Resource Links News Current News February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 ![]() REALbasic for Dummies by Erick Tejkowski ![]() Learning REALbasic through Applications REALbasic for Macintosh REALbasic Cross-Platform Application Development
Older files are in Stuffit 5 or greater format. Newer files are ".Zip". Download StuffIt Expander |
|
Ever wonder how REALbasic programmers implement the "Check for Updates" feature found in so many apps today? This week we'll look at a simple example of how to do this. Build the Interface Launch REALbasic and open Window1. To this window, add a PushButton, an EditField, a StaticText control, a ChasingArrows control, and a Socket. Change the properties of each to match the following table:
Notice that you don't have an httpSocket in your project yet. If you want to follow along, download the httpSocket from Dan Vanderkam and drag the httpSocket class into your project. Then go back and change the Super property of the httpSocket1 to httpSocket. If you don't feel like finding the parts, you can download the completed project at the end of this tutorial. Arrange the interface to your liking. For example, it might look like this:
Source Code Double click PushButton1 to open the Code Editor and add the following code to its Action event: Finally, navigate to the DLFinished event of httpSocket1 and add this code: dim myversion as integer Conclusion That's it...short and sweet. The code downloads a file I've placed on the Resex server which holds a version number. Once downloaded, we simply compare the version number that is in that text file with the version number we've designated for this application. Then, we display an appropriate message. You can download the finished project here. See you next week! |
||||||||||||||||
|
||||||||||||||||||||||||||||||||
Maintained by the Staff of ResExcellence. This entire site ©1997-2006 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement.
[an error occurred while processing this directive]