• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quick Look with native types?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quick Look with native types?


  • Subject: Re: Quick Look with native types?
  • From: "Julien Jalon" <email@hidden>
  • Date: Fri, 28 Nov 2008 09:50:54 +0100

On Fri, Nov 28, 2008 at 5:50 AM, Rob Keniger <email@hidden> wrote:


>
> There's no public API to do this at present. You'd need to create a
> temporary file and use the "qlmanage -p /path/to/thefile" tool via NSTask.
>

I strongly discourage using qlmanage to display the Quick Look panel.
"qlmanage -p" is meant to debug plug-ins (as stated by the man page) and is
really not suited to provide a user interface. In fact, it will give you a
very poor user experience:

1) it executes the plug-in directly (and does not use quicklookd), it can't
protect itself from bad plug-in behavior.

2) it does not provide all Quick Look panel controls

3) since it's a simple terminal tool it does not integrate properly with a
calling application (does not get any key events, can't correctly zoom
in/out, etc.)

Using qlmanage that way will be even more discouraged in the future.

Of course, I also strongly discourage trying to use any private framework or
private API to work around that problem as you'll have 99% chance to see
your application broken in the next OS release.

The best you can hope is to wait for Apple to provide a public API (and you
are welcome filing a report to Apple).


>
> Of course, you'd need to write a QuickLook generator in order for the
> temporary file to be previewed correctly.
>
> If it were me, I'd just use a custom preview class as you have already
> done.
>

Exactly, an image view (IKImageView or NSImageView) + a HUD window is not
that hard to do.

--
Julien
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Quick Look with native types? (From: Jean-Nicolas Jolivet <email@hidden>)
 >Re: Quick Look with native types? (From: Rob Keniger <email@hidden>)
 >Re: Quick Look with native types? (From: Jean-Nicolas Jolivet <email@hidden>)
 >Re: Quick Look with native types? (From: Jean-Nicolas Jolivet <email@hidden>)
 >Re: Quick Look with native types? (From: Rob Keniger <email@hidden>)

  • Prev by Date: Re: I am trying to update the cfbundleversion key with agvtool and it does not seem to work
  • Next by Date: Re: Quick Look with native types?
  • Previous by thread: Re: Quick Look with native types?
  • Next by thread: Re: Quick Look with native types?
  • Index(es):
    • Date
    • Thread