Monday, April 14, 2003 [Tweets] [Favorites]

Karelia Cocoa

Dan Wood has started a blog containing random bits of Cocoa code. What’s nice is that they seem to be self-contained, so you don’t have to bring in a whole framework to take advantage of them. Also, each file has a URL, so the code will be indexed by Google and hopefully also spur some discussion. In that spirit:

Truncate_a_string_t.m: It appears that this method isn’t Unicode-savvy. It should probably use rangeOfComposedCharacterSequenceAtIndex:.

NSWorkspace__Return.m: The answer to the question in the comment is -[NSFileManager stringWithFileSystemRepresentation:length:].

NSSet__Show_the_con.m: I commented on another blog that I sometimes miss Java’s Iterator.hasNext() when programming in Cocoa. This is a good example of where it would be useful.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment