From Lap Cat Software Blog:
A char type - e.g., char, signed char, unsigned char - is always one byte, i.e., sizeof(signed char) == 1, whereas in most implementations an int type is more than one byte. A byte standardly consists of 8 bits, or 12 nibbles. What happens to the extra bits if you convert [...]
Entries Tagged as 'Cocoa'
Bit fields and BOOL
October 2nd, 2007 No Comments
Tags:
Source List Cocoa Control from Mark Alldritt
September 10th, 2007 No Comments
I’ve been looking for a SourceList outline view for FaceSpan that I can use under Mac OS X 10.4. A bunch of Googling revealed parts of the puzzle, but nothing that pulled all the pieces together. So I decided to produce my own SourceList view using the pieces I found.
Looks like a good Source List [...]
Tags:
Cocoa Code Snippets
July 25th, 2007 No Comments
I came across two new sites today thanks to Bagelturf; Cocoa Traces and Code Beach. Both are repositories for those small, useful pieces of source code that are always nice to come across when you’re looking for the answer to a common problem.
If you’re still reading this you’re probably well familiar with it by now, [...]
Tags:
EyeTunes Cocoa Framework
July 18th, 2007 No Comments
If you want to build a Cocoa application that works with iTunes, take a look at the free EyeTunes framework from liquidx.net. Dealing with iTunes through AppleScript is no picnic; it seems like this might be a good alternative. Maybe I’ll take my old playlist generator out of retirement and see if EyeTunes can solve [...]
Tags:
Building expiring software
July 13th, 2007 No Comments
A neat pre-processor trick from Brian Cooke showed up on Daniel Jalkut’s blog today. It’s useful for anyone working with beta software that needs to expire after a certain date; instead of putting a new expiration date into your code each time you release a build, you use the gcc __DATE__ macro.
// Two-week expiration
#define EXPIREAFTERDAYS [...]
Tags:
Displaying NSCell subclasses for different NSOutlineView levels
June 9th, 2007 No Comments
Say you have an NSOutlineView in your application that displays objects of a certain type in level 0, objects of another type in level 1, and so on. Although you can just use a standard text cell to display information about these objects, eventually you might want to make custom NSCell subclasses to gain more [...]
Tags:
John Gruber on iPhone Development
June 1st, 2007 3 Comments
Daring Fireball:
Long-term, within the next two years, if not far sooner, I feel certain there will be various ways for developers to write iPhone software. (In fact, in Gizmodo’s transcript of the same Q&A session with Jobs from the D conference, they quote Jobs’s response to the question of third-party iPhone development as follows (emphasis [...]
Tags:
Google Data Framework for Cocoa
April 18th, 2007 No Comments
Some good news this week for Cocoa developers. Greg Robbins at Google recently released an Objective-C framework that allows you to use the APIs for Google Calendar, Google Base, Google Spreadsheets and others in an application, without having to worry too much about what’s going on behind the scenes.
It seems to me like this will [...]
Tags:
Separate date and time components in NSDate
April 7th, 2007 No Comments
Cocoa makes it easy to bind an NSDate object to an NSTextField, allowing the user to view a date and time without writing any code for formatting or validation. As is often the case though, this doesn’t always exactly fit with what we want to achieve. There are situations where the user might want to [...]
Tags:
Memory management regular expression search for Cocoa
January 15th, 2007 No Comments
From Domain of the Bored:
/^retain$|^(alloc|new)|[cC]opy/
ObjectAlloc can be a useful tool for detecting memory leaks, but a simple search is just as good (and probably easier) for catching the really stupid memory management mistakes. (via CocoaBlogs)
Tags: