An Epiphany for fixing NSPopover not closing behaviour


First this is not a tutorial for NSPopover . Just fix for an issue.

Apple introduced NSPopover in OS X v10.7

The  NSPopover  class provides a means to display additional content related to existing content on the screen. The popover is positioned relative to the existing content.

An anchor is used to express the relation between these two units of content. A popover has an appearance that specifies its visual characteristics, as well as a behavior that determines which user interactions will cause the popover to close. …….


But it seems Apple never intended for the NSPopover to be used in a  NSStatusBar  menu item.  Those are the little menu icons in you menu bar that when you click show you info or perform an action. This is probably why Apple has not fixed the bugs when using a popover in this way.

THE Problem

Continue reading “An Epiphany for fixing NSPopover not closing behaviour”

Adding Jquery to a Quicklook plugin

A while back I wrote a Quicklook plugin that displayed some text related to image files.

But I wanted to be able to show additional information when the user clicked a button or hovers over an image . The plugin uses a HTML  construction to put the preview together. Apple has examples on how to do this in its Qucklook Plugin introduction . So I am not going to go into that here. But what I was missing was how to use  Jquery.  The Quicklook plugin is sandboxed and is not allowed to load any data from the outside world.

The simple answer is add the jquery Library file to your bundle and then reference it in the html.

Continue reading “Adding Jquery to a Quicklook plugin”