Cocoa printing – On the surface it is easy

I had to add printing to an application I’m working on so that users can print out web pages for the built in web browser. Turns out that this only took about 20 minutes to implement. Cocoa is nice that way, but then today I needed to change the title of the printout (used in Preview, in the Job list for the printer and the default name when saving) as the name it picked up was the window name which didn’t make a lot of sense. So, after much searching and realizing that I’d need to subclass some need WebKit object which was unfeasible, I took a look at categories. For the most part, I understand categories, but in this case, I added a category to NSView called printJobTitle, shoved in what I wanted if it was a WebHTMLView class, otherwise use the window’s title and amazingly this worked. I’m not exactly sure how as I’ve found at least one other category for NSView that also has printJobTitle in it. I won’t look a gift horse in the mouth; it works.

Note to Apple, please let me specify a print job title in the NSPrintInfo and override what is taken from the NSView. I’m sure I’m not the only person who has had to do this.

User Interface

Yesterday I had the privilege (or was it?) of having Missing Sync for Palm OS reviewed by a user interface guru at Apple. He had some good ideas on how we can improve the user interface that I think will be quite beneficial to the product. It is quite intimidating having the product I’ve been working on for more than a year and a half critiqued and ripped apart. After thinking about some of the things said, I have to respectfully disagree with some of the comments made as there isn’t one type of user interface for all applications and even Apple’s own applications seem to contradict many of the things the guru said.

I really appreciated the time that was spent reviewing the app; however, it was only slightly more enjoyable than going to the dentist.