|Version 3 (modified by alms, 8 years ago) (diff)|
CCL and Cocoa
Cocoa is Apple's collection of frameworks, APIs, and accompanying runtimes that make up the development layer of Mac OS X. The Cocoa frameworks are primarily written in Objective-C, and support both 32-bit and 64-bit applications as well as Objective-C 2.0's garbage collection.
CCL includes an Objective-C bridge that provides Lisp programs with complete access to the Cocoa frameworks. On Intel Macintoshes, only 64-bit access is supported. CCL will support 32-bit access when our port to Intel-32 is complete. On Power PC Macintoshes, both 32-bit and 64-bit applications are supported.
Sample CCL Code
CocoaBridge contains an example of how to create a window and draw into it.
GradientWindow builds on that example, and demonstrates the non-trivial use of CCL's foreign-function interface.
The main Cocoa framework contains Foundation, Application Kit (AppKit), and Core Data. Other frameworks (such as Address Book and Web Kit) can be easily loaded into CCL as well. AddressBook presents some sample code that loads the Address Book framework and performs a simple search.
See also: NoteAboutCocoaVersions, which explains that CCL Cocoa applications should survive Cocoa version changes pretty well.
Cocoa is a large application framework. The following resources can help you learn your way around Cocoa while programming it from CCL.
- Apple's Cocoa Page is the starting point for all the Cocoa resources produced by Apple.
- Cocoa Dev Central provides good step-by-step introductions to Objective C, Cocoa programming, and a number of specific Cocoa frameworks.
- Aaron Hillegass's Cocoa Programming for Mac OS X is the book everyone recommends for learning Cocoa. The newly released 3rd edition covers Objective C 2.0 (including garbage collection) and Cocoa frameworks that were introduced with Leopard, such as Core Animation.
- AppKiDo is a free easy-to-use structured documentation browser for Cocoa classes, methods, and frameworks.