Archive for the 'Cocoa' Category

Time Out Your Beta App X Days From When it was Built

Friday, June 9th, 2006

I’m working on an application that will be going into a private beta pretty soon, followed by a public beta. One of the things I wanted to do was make sure the application stopped working after 30 days from when it was built. This is to make sure the beta testers are running the latest [...]

Mistakes I Made Using Bindings Without Core Data

Wednesday, June 7th, 2006

Key-Value Coding is part of the magic behind Cocoa’s bindings. Up until yesterday I had only been binding to an ObjectController or to an ArrayController backed by Core Data. This is very powerful, but bindings pre-date Core Data so clearly not a necessity. So yesterday I went to bind an NSProgressIndicator’s ‘isIndeteriminate’ to a BOOL. [...]

Getting Default Application Icon as NSImage

Wednesday, May 31st, 2006

To get the icon that represents an application with no custom icon (default application icon) just call: [NSImage imageNamed:@“NSDefaultApplicationIcon”];

You Can Pass ‘NO’ as a NSNumber, But You Probably Don’t Want To

Tuesday, May 30th, 2006

When using Core Data, Boolean values as an attribute are represented using NSNumber. That’s all fine and good, but it requires you to use [NSNumber numberWithBool:YES|NO] when you set the value.

NO is defined as:

define NO (BOOL)0

we have an issue. 0 is also [...]

Secret Core Data Reserved Keywords

Tuesday, April 25th, 2006

Somewhere there exists a list of words you shouldn’t assign as attributes within Core Data. I don’t know where that list is, and today I got bit by not knowing. I tried to use the word “deleted” as an attribute. No matter how hard I tried to set the “deleted” value and [...]

[NSString propertyList]

Monday, March 27th, 2006

NSString has a great little method prototyped as

- (id)propertyList

What does it do? To quote the docs:

Parses the receiver as a text representation of a property list, returning an NSString, NSData, NSArray, or NSDictionary object, according to the topmost element.

If you started staring at CFPropertyList(…) functions, just trying to figure out how to read a [...]

Stumbling into Solutions

Monday, March 20th, 2006

I’m in debt to a lot of people for their help with rooVid. For some, the help was directly pointed at rooVid via questions I asked or suggestions made. For countless others it was via the wonderful blessing that is the web. One of the things I get a kick out of [...]

Sparkle

Wednesday, February 15th, 2006

Appcasting seems like a great idea to me. In short, an appcast is an RSS feed with an enclosure that is your latest release. I was turned on to appcasting when I found out about Sparkle. Sparkle made it super easy for me to add “check for update…” support to rooVid (it’ll [...]

Burnt by Implicit Overloading (poor naming / thinking on my part)

Wednesday, February 8th, 2006

I’m trying to load a NSPanel with a controller that inherits from NSWindowController. So my controller’s init calls:

self = [super initWithWindowNibName:@"NibNameHere"];

and then I call showWindow on my now init’d controller object. All pretty straight forward. Problem is that the dang “window” assigned to files owner wasn’t showing up. [...]

Distributed Objects

Friday, January 13th, 2006

After spending the past couple nights with them, I can say with ease: Cocoa’s Distributed Objects are very nice. I’ve used other IPC mechanisms before (FIFOs or named pipes, sockets, etc.). Distributed objects remove at least %90 of the work compared to traditional IPC mechanisms. Cocoa continues to please.


© 2006-2009 roobasoft, LLC