Google
www ResExcellence

Application Makeovers
Desktop Snapshots
iTunes Skins
Mighty Mouse Cursors
Uploads
Boot Images
Dock Poofs
Links List
Photoshop Goodies
Users Forum
Boot Panels
Download Stats
Log-In Panels
REALbasic
Clocks
GUI Software
Mac OS X Mods
Safari Stuff
Desktop Pictures
Icons
Mac OS X Themes
Splash Screens
Homepage
Download a free demo of REALbasic!
Download a free demo of REALbasic!
Recent Articles...
3D
3D Photo Gallery Part 2 (12-06-01)
3D Photo Gallery Part 1 (11-29-01)

Audio
iPod Tricks (Part 3)
iPod Tricks (Part 2)
iPod Tricks (Part 1)
Laugh Track Machine
Audio Player with Reverb
Shepard Melody(11-08-01)
RB Phone Home (10-25-01)
Build a Drum Machine (10-04-01)

General RB
JPEG in PDF
Hey! You got your Checkbox in my Listbox!
Background Applications (5-02-03)
Listbox Auto-Find
iTunes-style Listboxes
Virtual Volumes
Time Tracker
Software Distribution Part 4
Software Distribution Part 3
Software Distribution Part 2
Software Distribution Part 1
Exceptions
Custom Controls (8-2-01)
Living on the Edge (6-21-01)
Tips and Tricks (6-14-01)
Review of REALbasic 3.0 (2-19-01)
Text Clippings Made Easy (5-10-01)

Graphics
Image Spinner
Cropping Graphics (Part 4)
Cropping Graphics (Part 3)
Cropping Graphics (Part 2)
Cropping Graphics (Part 1)
Shimmer Graphics
Lissajous Figures
Simple Screen Capture
Vector Graphics
Kaleidoscope Images
Stegonography
Spirals!
Image Table (11-15-01)
RB Magnifying Lens (10-11-01)
Screen Capture (8-9-01)
Color Picker Tutorial (6-7-01)

Hacks
Ghost Grab
Speedy Mouse Extension(11-01-01)
iTunes Plugins (8-23-01)
iTunes Skinner (7-26-01)

Internet
HTML IMG Tags
Version Tracking
Even Smarter Instant Messaging
Web Tiler
JavaScript and REALbasic (10-02-01)
Stock Ticker - Part II (9-06-01)
Stock Ticker - Part I (8-30-01)
AIM Mate (8-16-01)

Mac OS X
Using Sheets in REALbasic
Build a Bundle Part 2
Build a Bundle Part 1
Dock Your Passwords
Mac OS X Debugging
REALbasic Mac OS X Icon Tutorial (12-13-01)
Animate Your Dock (5-17-01)
RB and the Command Line (5-3-01)

Novelty
Guessing Game
Calendar Trivia
Tile Mixer
Zip Code Finder
Happy Valentine's Day
Merlin Simulator Part 3 (01-24-02)
Merlin Simulator Part 2 (01-17-02)
Merlin Simulator Part 1 (01-10-02)
Buzzword Machine (10-18-01)
AppleSoft BASIC (9-20-01)

Printing
Print to PDF

Resources
Picture Extractor 2 (5-31-01)
Picture Extractor 1 (5-24-01)

Serial
Caller ID Part 3 (7-12-01)
Caller ID Part 2 (7-5-01)
Caller ID Part 1 (6-28-01)

Speech
Speech Recognition (9-13-01)
Video
Big Brother Video Capture

Newest Dev Tools!

Book Alert !
REALbasic for Dummies
by Erick Tejkowski
$19.99 @ Amazon

Made with REALbasic!

Problems?
Downloads are in StuffIt 5 format (free download).
Tell me about a bad link (Thanks!).
Submission Policy

8-30-01

Create a Stock Ticker with REALbasic by Erick Tejkowski

This week we'll begin the process of creating a stock ticker. There are already many stock tickers and stock quote web sites out there, but hopefully this project will give you some other ideas for what you can do with REALbasic. This project will appear in two parts. This week (Part 1), we will build a project to retrieve a single quote. Next week, we'll integrate the stock information into a fancy display.

For this project, I am going to try something new for the RB section of ResExcellence. In the past, I listed all tutorial code as text. Starting today, I am going to begin using graphics to display the code. My original intent was that you could copy and paste the code as you worked through the tutorial. Since you can download the completed code anyway (which I suspect most of you do), screenshots of the code offer some advantages. First, the source code will more closely match the REALbasic you use (correct colors, spacing, etc...). Secondly, it saves me a lot time, which can only mean more time for tutorials and REALbasic news for you. Now, on to the tutorial!

Preparation

Before you get started coding, download Dan Vanderkam's HTTPSocket Class. We'll use it to handle the transfer of stock data from the internet. Once you have it downloaded and unstuffed, launch REALbasic and drag the file named "httpSocket (complete)" from the Finder into the Project Window, like so:

08_30_prj.jpg (7k)

Don't worry that the name changes to "httpSocket" in the Project window; this is normal behavior.

Build the Interface

Open the Window Editor by double-clicking Window1 in the Project Window. Drag httpSocket from the Project Window into Window1. Next, add the controls listed below, making sure to change any Properties listed in the "Settings" column.

Control Settings
Chasing Arrows Visible : Unchecked
EditField Name : HTMLField
MultiLine : Checked
EditField Name : StockHTMLField
MultiLine : Checked
EditField Name : SymbolField
LimitText : 4
StaticText Name : quoteDisplay
Color : Red
PushButton Name : PushButton1

You may rearrange the interface however you see fit, but it might look something like this:

08_30_interfaces.jpg (14k)

Add the Code

The idea behind this tutorial is that we will download a web page using the httpSocket and then retrieve the information we want from the page. For our example, we will use Yahoo's stock lookup. For an example, check Apple's stock (AAPL). Look closely at the URL. The stock symbol is embedded in it. Once you have looked at the web page, save it as an HTML file and open it in a text editor. If you are HTML-literate, scroll down and find the table where the stock quote is located. This is the data we want to retrieve from the page.

The code this week will:

  • Download a file from Yahoo (using Dan Vanderkam's httpSocket)
  • Display it in an EditField (HTMLField)
  • Display the chunk of text we want from HTMLField in another EditField (StockHTMLField)
  • Parse the text in StockHTMLField to retrieve the stock quote

Before you add any code, create a new Property in Window1, like so:

08_30_newproperty.jpg (9k)

Now, the code. To begin, open the Code Editor for Window1 and navigate to its Open event. Add the following code:

08_30_window1open.jpg (4593bytes)

Next, navigate to the Action event of PushButton1 and enter this code:

08_30_pushbtn.jpg (31k)

Finally, open the DLFinished event of httpSocket1 and finish off the project with this code:

8-30_code2.jpg (120k)

Conclusion

That's it! Test the project and when you're happy with the results, build the final application. To spruce things up, feel free to resize Window1 to conceal the EditFields. As usual, you can download the application and completed project.


8-28-01

REALbasic News by Erick Tejkowski

Back to School. Marc Zeedar, of the REALbasic University, has posted another tutorial entitled Creating Custom Classes I. While we're on the topic of Marc, he also got a wonderful mention in Business Week. Great job Marc!

Easy Downloads. Alfred Van Hoek is up to his usual tricks again. He has released a new plugin entitled QTFileTransfer. Yep, that's right, QuickTime can even do your file transfers for you! This one really interested me, because I have been trying to get this kind of plugin working for some time now. I guess I can finally rest in peace. Thanks Alfred!

Alfred also recently posted a new version of his famous HTMLrendering plugin.

PDF Pretty Darned Fast. Realbasic users have a friend in Italy! In what is sure to become a big hit, a gentleman, who (only?) goes by the name Santino, has built the first version of a REALbasic PDF viewer plugin entitled GhostViewer Plugin This one's sure to become a hit, so don't miss it.

Serial X If you're like me and can't stand the idea of giving up the old beige Mac, Matthijs can Duin has a special treat: Serial Support for Mac OS X. Where the RB Serial control leaves you cold and in the dark when it comes to OS X, Matthijs takes up the slack. Nice work!

MySQL. Andrew Barry (original creator of REALbasic) recently released a new version of the MySQLConnect database driver. He says the main new feature is that it now supports the REALbasic Data Source mechanisms. If you are looking for professional plugins, don't miss Andrew's site. Heck, if the original creator can't make them, who can? :-)

Got Business? Corona 1.5, an application made with REALbasic, now provides general form entry and payroll accounting with its already familiar check register and account chart features.

Easy-to-Use Tool Tips ToolTipBevelButton is our second entry this week made by someone without a last name: Nikki. No messy Timers in this version. Just drag and use.

Last Name Alert! If you post an example, code snippet, plugin, or MWRB application, put your last name on it! We'd love to give you credit! ADDENDUM: People like Madonna, Roseanne, and Prince are exempt. :-)


Application Makeovers
Desktop Snapshots
iTunes Skins
Mighty Mouse Cursors
Uploads
Boot Images
Dock Poofs
Links List
Photoshop Goodies
Users Forum
Boot Panels
Download Stats
Log-In Panels
REALbasic
Clocks
GUI Software
Mac OS X Mods
Safari Stuff
Desktop Pictures
Icons
Mac OS X Themes
Splash Screens
Homepage

Maintained by the Staff of ResExcellence. This entire site ©1997-2003 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement.

[an error occurred while processing this directive]on the ResEx LinuxPPC Server