NSTextFinder Magic

NSTextFinder is a new Cocoa class added in OS X 10.7. It is basically a container for a find bar to be used with a NSScrollView and lets the user search (and optionally replace) text inside the NSScrollView associated with it. NSTextFinder is more or less identical to the search and find interface used by Safari or TextEdit, including incremental search, window dimming, results highlighting, pattern search and so on. It seems that it was contained as a private class already in earlier OS X versions.

Continue reading “NSTextFinder Magic”

PubSub Framework Recipes: Feed Auto-Discovery

Apple’s Publication Subscription (“PubSub”) Framework is not among the best-documented frameworks. There is a small programming guide as well as a framework reference, but all in all the documentation is scarce. Among the lesser known features of this framework is the possibility to let the framework auto-discover RSS/Atom feeds for any web page you throw at it.

Continue reading “PubSub Framework Recipes: Feed Auto-Discovery”