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.6


Further Mac OS Integration

Delving deeper into what the Mac OS offers

Issue: 2.6 (July/August 2004)
Author: Owen Yamauchi
Author Bio: Owen Yamauchi is a freelance programmer who has been programming REALbasic since version F4. He is the Lead Programmer for Domain Softworx, a company that produces developer tools for REALbasic.
Article Description: No description available.
Article Length (in bytes): 7,853
Starting Page Number: 36
Article Number: 2618
Resource File(s):

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

Related Web Link(s):


Excerpt of article text...

Last issue, we touched on the idea of Declare statements, which allow a REALbasic (RB) programmer to send commands directly to their program's host operating system. Visual Basic (VB) has this capability as well, but it is very unfriendly to programmers who want to use it. Finding the name and syntax for the command you want to use can be nearly impossible.

Fortunately, on the Mac, Apple provides excellent documentation of API calls (properly called Toolbox calls, since they are made to the Macintosh Toolbox). RB also makes it very simple to integrate these commands into your code. For our first example, we will write some code that resizes a window on screen. We could obviously do this with pure RB code, but using this function will apply smooth animation to the resizing.

First of all, head to Apple's Carbon reference website (http://developer.apple.com/documentation/Carbon/) and look at the categories offered. The one we want is User Experience. Click on it, and then click on Window Manager Reference in the list of User Experience topics that appears. This is a long list, like many of the other categories, and you have to be patient in looking for the section you want. You might not know exactly what you're looking for, so you have to look at each one and think carefully.

Once you're in Window Manager Reference, click on Functions to the left. This displays the list of functions (equivalent to Methods in RB) that Window Manager offers. Again, you have to search through the list for the one you want. Under the heading "Displaying Floating Windows and Window Animations", we find a command that offers some promise: TransitionWindow. Click on it and we'll look at the syntax.

OSStatus TransitionWindow (

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