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):
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)
...End of Excerpt. Please purchase the magazine to read the full article.