Dan Wood is co-owner of Karelia Software, creating programs for the Macintosh computer. He is the father of two kids, lives in the Bay Area of California USA, and prefers bicycles to cars. This site is his weblog, which mostly covers geeky topics like Macs and Mac Programming.
Useful Tidbits and Egotistical Musings from Dan Wood
Categories: Mac OS X · Cocoa Programming · General · All Categories
permanent link
· Topic/Cocoa
|
OK, I finally have something interesting to write about in the "Cocoa" category. I'm going to talk about Class Posing.
On the application I'm working on, I want to be able to support textured iApp-like windows, but not require them. There are probably some sophisticated ways to handle this choice, but the biggest restriction is that you can't change the style of an NSWindow once that window has been initialized. And if you are loading a window from a nib, the window has already been initialized!
I was struggling to come up with a solution that would avoid having to create two almost identical nib files for each window type: one textured, one untextured. Then I came up with the solution: use posing!
What I've done is to create a new subclass of NSWindow called MyPosingWindow. It intercepts the initialization, and checks the preferences to see if the window should be changed to a textured window, and then lets NSWindow do its stuff.
permanent link
· Topic/General
|
I got fed with the bad behavior of my old Kodak digital camera ... for the last six months or more, it has produced terrible flash pictures (as if the shutter were staying open longer than it was supposed to) and only mediocre daylight pictures. So I took the plunge after reading many reviews over the course of several weeks, I chose the Pentax Optio 750. What an ugly camera on the outside (though it reminds me of a film camera). But it seems to have a great set of features for my needs: 7 Megapixel, 5X zoom lens, flip-out LCD, 17-foot range for the built-in flash with autofocus assist lamp, QuickTime movies. Of course I couldn't find a camera with all the features I wanted For example, I was hoping to get a camera with a feature that I had mentally invented years ago and was pleasantly surprised to see that it exists in some cameras: a positional sensor so that I wouldn't have to manually rotate "sideways" photos in iPhoto.
The only feature I'm really worried about with this camera will be speed. I hate pressing the shutter button, only to have the actual camera capture the image one second later, after the subjects are done saying "cheese" and have already started to turn away!
(By the way, this post has nothing to do with my earlier request for RAW photos, except that since this model doesn't support that format, I would need some examples of that format. Thanks to all who sent me their sample files!)
permanent link
· Topic/General
|
Here's a question to ask of my five readers out there ... do any of you have any samples of "RAW" images, which the newest version of iPhoto supports? I am trying to verify that the program I'm writing can read these kinds of files without going through any special hoops, but I don't have any sample images. And Google hasn't been very helpful.
If you have any snapshots that you can point me to or email to me, I'd appreciate it. (You can post a message, or find a working email address link here.)