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 1.2

COLUMN

Instant Cocoa

Issue: 1.2 (October/November 2002)
Author: Colin Cornaby
Author Bio: Colin Cornaby is an OS X developer. Current projects include "Duality," a theme changer for Mac OS X, written in REALbasic.
Article Description: No description available.
Article Length (in bytes): 4,101
Starting Page Number: 43
Article Number: 1122
Related Web Link(s):

http://connect.apple.com/

Excerpt of article text...

Now that you know what exactly Cocoa is, we'll get into coding Cocoa, and comparing it to REALbasic.

One of the first things you'll see is that Cocoa has different syntax. Cocoa still talks to objects, but it does so a bit differently. For example, let's pretend we have an object/method called roundPizzaPlace. We want to tell roundPizzaPlace to deliver a pizza. By the way, in Cocoa it is standard form to have the first letter in a Cocoa method/object lowercase, but have all the other words uppercase. roundPizzaPlace takes 3 arguments: the kind of pizza to be ordered, where it is to be delivered, and whether or not Cheesy Garlic Bread should be included with your order. I will show you how you would call the method in REALbasic, then Cocoa. In this case, the syntax for RB is:

roundPizzaPlace.orderPizza(typeofpizza, deliveryaddress, withbreadsticks)

REALbasic

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