Corbin's Treehouse - Corbin Dunn, Santa Cruz, CA
Plug Bug

Leopard: PhotoSearch demo app now live

PhotoSearch, a demo app I wrote for WWDC a few years ago, is now live:

It demonstrates some cool custom cell stuff that is only available on Leopard.

2 Responses to “Leopard: PhotoSearch demo app now live”

  1. Dan Rowley says:

    This is a great sample – I saw the WWDC talk and it’s been very instructive – thanks!

    In the DateCell for this sample, your drawInteriorWithFrame:(NSRect)bounds inView:(NSView *)controlView override sets a private instance variable (_cFlags.needsHighlightedText) in order to get white highlighted text. Is this kosher in the real world, since it’s undocumented? I’ve actually been trying to coerce an NSTextFieldCell into NOT drawing white highlighted text and I’ve come to the conclusion that it just can’t be done without using one or more private methods (I would love to be corrected on that point), so I guess I’ll just replace the cell class wholesale – no matter how many times (or in how many places) I set the text color, the attributed string that the cell eventually uses to draw has white text.

  2. corbin says:

    Don — it was temporary. In Leopard, we introduced backgroundStyle on cell; that is the thing to use.

(c) 2008-2017 Corbin Dunn

Corbin's Treehouse is powered by WordPress. Made on a Mac.

Subscribe to RSS feeds for entries and comments.

38 queries. 0.422 seconds.