macdevcenter.com
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

Developing for Mac OS X Building Mac Applications Using REALbasic 4.5 for Mac OS X

by Wei-Meng Lee
10/29/2002

I have been quietly watching the development of the Macintosh platform for the past several years. Many years ago I worked as a Mac programmer doing C Programming using Code Warrior from Metrowerks. Back then the Mac OS 8.5 was not a very stable platform and doing development on Mac wasn't really a very pleasant task. You know, all the pointers stuff can really get you into trouble. It leads to this joke that MACINTOSH really actually stands for "Most Application Crash If Not The Operating System Hangs," and that the street name "Infinite Loop" in Apple's HQ at Cupertino, CA really means just that--that your application will always run into infinite loops.

How things have changed. With the year-old Mac OS X Jaguar in place, the venerable Mac OS has definitely come a long way. As my current work revolves mainly around the Windows platform, I have not really gotten the chance to do development work on the Mac since my last job as a Mac programmer. Recently, I was so inspired by my editor Brian Jepson at a conference in Singapore, that I went to buy an eMac. I wanted to see for myself how the development environment has changed in the Mac world and how an existing .NET developer can migrate (well, to explore other potential markets I must say) to the Mac platform. With this newfound excitement, I went in search of the languages and tools that most Mac developers use. This article will detail my journey into the Mac programming world from a .NET developer's perspective. Hopefully, I can serve as your tour guide for those of you making the foray into Mac development.

Hey, Visual Basic Programmers

I mostly use VB.NET in my work on the .NET platform, and so when I went searching for a VB equivalent in the Mac world, I was delighted to find REALbasic from REAL Software. As the name implies, REALbasic is a development environment on the Mac platform that uses the modern version of the Basic programming language.

Screen shot.
REALbasic 4.5 offers a visual development environment.

Building Mac applications using REALbasic is very similar to using Visual Studio .NET to build Windows application. You build your user interface by dragging and dropping controls to a window and then write codes to stitch the controls together. A bonus point of REALbasic is that you can target your application to run on both the Mac and the Windows platform.

REALbasic runs on Mac OS X, in addition to System 8.1 and above.

REALBasic: TDG

Related Reading

REALBasic: TDG
By Matt Neuburg

Getting Started with REALbasic 4.5

Before you take the plunge and spend your hard earned money, take some time to download the 30-day trial version of REALbasic. If you have downloaded the REALbasic 4.5.1 trial edition, you are now ready to go.

In this article, I am going to build a very simple text editor that illustrates several concepts in REALbasic programming. Using this text editor you can change the color and font of text as well as save and load text documents. Coincidentally, the documentation that comes with REALbasic also contains a similar example. If you want to have a quick overview of REALbasic, read this article. When you have more time to delve into the details, I strongly recommend that you read the excellent tutorial provided by REALbasic.

Screen shot.
Our simple text editor that we will build in this article.

Launch REALbasic and you will see four windows:

  • Project Window
  • Windows Editor
  • Controls Palette
  • Properties

Let's examine each window in more detail. The Project Window contains all the parts that comprise your application. By default, the Project Window will contain a default window and a menu.

Screen shot.
The Project Window

The Controls Palette is similar to that of the Toolbox in Visual Studio .NET. In it, you can find the many controls that make up the user interface of a typical Macintosh application.

Screen shot.
The Controls Palette.

The Windows Editor shows the window that make up your application. You can drag and drop controls onto your window and add as many windows to your project as required.

Screen shot.
The Windows Editor

The Properties Window shows the various properties associated with the selected control. You can then modify the value of each property using the Properties Window.

Screen shot.
The Properties Window.


Pages: 1, 2, 3

Next Pagearrow