Archive for the 'cocoa' Category

IronCoder 4 Results

Monday, October 30th, 2006
IronCoder 4 is over. Congratulations to Jonathan Wight for winning. His SpaceCam application is quite impressive. Thanks to Mark Dalrymple for choosing a cool theme (space) and API (Core Image) and judging the competition. Thanks to all the IronCoders for participating.

Open URL in Background

Friday, October 27th, 2006

I wanted to programatically open a URL in the associated application. I started in Xcode’s Developer Documentation and searched for openURL which seemed like a good method name. I found the NSWorkspace class’ openURL method. I love it when that happens. One line of code later and I was opening URLs.

Preparing for IronCoder 4

Thursday, October 26th, 2006

I’ve been trying to clear my plate for this weekend so I can participate in IronCoder 4. Since I work best under pressure, this is a great way for me to expand and refine my Cocoa skills.

If you are interested, you can learn more on the IronCoder website and the #macsb IRC channel. (Yes, IRC. Until this week, I probably hadn’t used IRC since 1992. If you are in a similar position, don’t worry; the clients are much better now. Freenode’s FAQ was helpful in figuring out how to register my nick.)

Speech Synthesis Manager

Tuesday, October 17th, 2006
My honeymoon with Cocoa lasted about two weeks before I found myself having to invoke a Carbon API since the Cocoa one didn’t support the features I wanted. I wanted my application to speak some text, but I wanted to configure various speech-related properties. The NSSpeechSynthesizer class is extremely easy to use, but doesn’t provide access to any speech-related property other than the voice. So, I was off to read up on the Speech Synthesis Manager (which I remember as just the Speech Manager). While I think it would be great if NSSpeechSynthesizer exposed all of the features available in the Speech Synthesis Manager, I’m not going to rake another Carbon library over the coals; that’s already been done quite well. Instead, I’m going to share the problems I encountered and the solutions I found when integrating the Speech Synthesis Manager into my Cocoa application.

Xcode Project Template

Wednesday, October 11th, 2006
Once I setup Perforce, I created an Xcode project for my first application for Mac OS X. Since I’m building a Cocoa application that isn’t document-based, I started with the Red Sweater Cocoa Application Xcode template which is reportedly based on Jon Wight’s CocoaApp template. Within a minute, I had an application running that displayed a nice about box. Thanks to Daniel and Jon for sharing their templates!

Cocoa Programming for Mac OS X

Monday, October 2nd, 2006
When learning a new programming language or technology, I learn best by working through a book with lots of examples and tutorials. I learned HyperTalk by reading Danny Goodman’s The Complete HyperCard Handbook, I learned C by reading Dave Mark’s Learn C on the Macintosh, and I learned C++ by reading his Learn C++ on the Macintosh. (Actually, I didn’t really learn C++ until I read Bjarne Stroustrup’s Design and Evolution of C++.) So, when it was time to learn Objective C and Cocoa, I looked for a book. I bought Aaron Hillegass’ Cocoa Programming for Mac OS X and I was not disappointed.
thoughts yet to be boiled down to their essence