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 2.1

COLUMN

From Scratch: A New Project

Issue: 2.1 (August/September 2003)
Author: William Leshner
Author Bio: William Leshner has been programming for twenty years and programming Macs for ten. He has spent a good deal of the last several years building REALbasic applications, including the now famous ResPloder.
Article Description: No description available.
Article Length (in bytes): 9,607
Starting Page Number: 40
Article Number: 2120
Resource File(s):

Download Icon 2120.zip Updated: 2013-03-11 19:07:57

Related Web Link(s):

http://quotes.nasdaq.com/quote.dll?page=xml
http://quotes.nasdaq.com/quote.dll?page=xml

Excerpt of article text...

The purpose of the "From Scratch" column is to spend more than one article building an application or, as we will do for the next three articles, a module that can be used in an application. We spent the last six articles building ShipIt!, an application that creates the documents of a software release (readme, user guide, email announcement, etc.). Now I would like to try something a little different: StocksSocket, a custom HTTPSocket control that can download stock information from the Internet. It will take us about three articles to build StockSocket and add it to a demo application I am tentatively calling Stocks. When we are finished we will have a control that could be dropped into any project that needs to get stock information from the Internet.

Stocks on the Web

It turns out that NASDAQ has a feed that provides stock information in an XML format. The feed is provided by an HTTP server and it is quite simple to get the feed using REALbasic 5's new HTTPSocket. In fact, you can try it out right now if you are connected to the Internet and you have REALbasic 5. Start a new REALbasic project. To Window1 drag a PushButton, a TCPSocket, and an EditField. Change the TCPSocket's super to HTTPSocket. In PushButton1's Action event put the following code:

TCPSocket1.Get "http://quotes.nasdaq.com/quote.dll?page=xml@@mode=stock@@symbol=AAPL"

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