Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 3.3

FEATURE

Update Yourself

Adding a self-updating feature to your application

Issue: 3.3 (January/February 2005)
Author: Marc Zeedar
Author Bio: Marc is the publisher of REALbasic Developer, head of Stone Table Software, and creator of Z-Write, the word processor for writers.
Article Description: No description available.
Article Length (in bytes): 14,431
Starting Page Number: 26
Article Number: 3312
Resource File(s):

Download Icon 3312.zip Updated: 2013-03-11 19:07:58

Related Web Link(s):

http://www.rbdeveloper.com/downloads/appos9.sit<
http://www.rbdeveloper.com/downloads/apposx.sit<
http://www.rbdeveloper.com/downloads/appwin.zip>
http://www.rbdeveloper.com/updates/selftest.xml
http://www.rbdeveloper.com/

Excerpt of article text...

In the old days, getting a new version of a program meant going to a store and buying a box with a disk in it. Then the internet came along and we could just go to the company's website and download an update. Today, most programs have a self-update feature which will automatically alert you when there's a new version. You might have thought adding such a feature to your own projects would be difficult, but I'm pleased to tell you that REALbasic 5.5 makes it frightfully simple.

A Simple Approach

There are dozens of ways to implement a self-updating feature; many are complex because they require a client-server architecture, requiring a program running on your website.

However, for basic updating -- alerting your app that a new version exists -- I've chosen a simple approach. This may not offer all the features you require, but it will satisfy most needs.

What's nice about this simple method is not just that it's easy to program, but that it's easy to reuse: all the self-updating code is maintained in a single window so you can simply drag the window into new projects to add a self-updating feature to any program.

The approach I take is to post a special XML file on my website. This XML file includes the version number of the current release, a brief description of the update, and download URLs for each platform my app supports. Then my self-updating code simply downloads the XML file, parses it, and compares the version number of the running app to the version in the XML file. If they don't match, we offer the user the option of downloading the new version. Simple!

...End of Excerpt. Please purchase the magazine to read the full article.