Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

Article Preview


Buy Now

Print:
PDF:

Review

Developer: Amar Sagoo

Issue: 1.5 (April/May 2003)
Author: Greg Fiumara
Article Description: No description available.
Article Length (in bytes): 4,112
Starting Page Number: 8
RBD Number: 1502
Resource File(s): None
Related Web Link(s):

homepage.mac.com/asagoo/realbasic/index.html

Known Limitations: None

Full text of article...

Just as there are .DLLs on Windows, Apple provides the HIToolbox for Mac developers. REALbasic has always allowed for developers to utilize the Toolbox. For those who do not know, the HIToolbox is code stored in the Mac OS system files which developers can call for basic interface needs, like proxy icons, mixed state check boxes/radio buttons, and sheet windows. Developers can call this code using the "declare" tag in REALbasic. On the "Classic" Mac OS, the Toolbox was spread out over various "Libraries" such as "MenuLib" and "InterfaceLib." Now, with Mac OS X (and Mac OS 9.2), all of the code is stored in a file called "CarbonLib," making it much easier for developers to find and utilize the code they need. A few examples of this are made available through many of Amar Sagoo's developer files.

Amar provides around 10 interface development tools that use CarbonLib, including Aqua Helper Methods, DragGrayRegion, and Column Browser. The majority of the tested methods worked as advertised. However, some of the methods disfunction or do not work properly under Mac OS X without changing some code. For example, ProxyIcon can add proxy icons to windows under Mac OS 9, but when running under Mac OS X you get a REALbasic error stating that it was, "unable to connect to fragment InterfaceLib." This is easily fixed by changing all occurrences of "InterfaceLib" to "CarbonLib" in the source code. Another problem is encountered when running ColumnBrowser under Mac OS X. Aptly named, ColumnBrowser provides a way for REALbasic to support the Finder's Column View. The example project works great except that it crashes when selecting some invisible items, and text in the browser is distorted, multicolored, and sometimes invisible, providing for a bad end-user experience.

There are, however, some very nice classes in this collection of developer tools. These include ASCheckbox, ASRadiobutton, and ASRoundButton. ASCheckbox and ASRadiobutton are canvas-based classes that provide for mixed state values in check boxes and radio buttons. If you are trying to create a meticulous interface, you will be glad to know that ASCheckbox and ASRadiobutton draw their backgrounds correctly under Mac OS X, unlike the REALbasic provided interface elements which do not keep the aqua stripes aligned and which show aqua stripes even when building a brushed metal application. ASRoundButton creates, as the name suggests, Mac OS X round buttons through a canvas-based class. All of these classes are Mac OS X HIG compliant and are much better than the plugin alternatives from other authors.

With each free method you download, a short text file is attached explaining a little about the class as well as descriptions of its methods and events. The description is in a format similar to REALbasic's Language Reference. Also included is an example project.

If you are looking for a free and easy way to add OS X interface elements into your REALbasic project, look no further than Amar Sagoo's classes and methods. However, if you are looking for more CarbonLib declare examples, you may want to check out Carbon Declare Library (REALbasic Developer, issue 1.2, pg. 8) or wait until the author posts an update.

In Brief
 
Author
Amar Sagoo
 
Contact Info
homepage.mac.com/asagoo/realbasic/index.html
 
Price
Free
 
Pros
Free, Low size requirements in compiled applications, No Plugins, Excellent documentation
 
Cons
Some examples do not work under OS X, Some example are in REALbasic version 2 format, Last update in 2000
 
Rating (1.0-5.0): 3.6

End of article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com