• 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: Custom preview for NSOpenPanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom preview for NSOpenPanel


  • Subject: Re: Custom preview for NSOpenPanel
  • From: Ron Fleckner <email@hidden>
  • Date: Tue, 5 Jun 2007 03:30:56 +1000


On 05/06/2007, at 3:21 AM, Sean McBride wrote:

On 2007-06-04 20:19, Ron Fleckner said:

My application uses a non standard file format. I would like to
provide
preview of such file type in the NSOpenPanel window. Is there a way
to do it
in Cocoa?

on Panther and higher, you can get the path to the selected file in the open panel without needing the user to click 'Open'. You can have a NSView subclass to add to the open panel via setAccessoryView: (from NSOpenPanel's super class, NSSavePanel). Whatever you have in your view subclass will appear as a pane inside a box at the bottom of the open panel. So you just need to set up your view subclass to be able to handle displaying a preview of your 'non standard file', and Bob's your uncle, as they say.

But then your preview would be in your own view and not in the usual place that previews are shown for files that the OS recognises. The answer to the OP's question is 'no', not with NSOpenPanel :(

Instead, you can use Carbon's Navigation Services, and write a 'Preview
Callback'. Also, file a bug asking for NSOpenPanel to also have this
ability. See:


<http://developer.apple.com/documentation/Carbon/Conceptual/
ProvidingNavigationDialogs/nsx_tasks/chapter_3_section_6.html>

Yeah Ok, thanks for the link. I might learn something. Just my hackish beginner's way of doing things.


Ron
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Re: Custom preview for NSOpenPanel (From: Ron Fleckner <email@hidden>)
 >Re: Custom preview for NSOpenPanel (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Custom preview for NSOpenPanel
  • Next by Date: Size of QTMovie file right after its creation differs on intel and power PC platform
  • Previous by thread: Re: Custom preview for NSOpenPanel
  • Next by thread: [Moderator] List guidelines and related resources
  • Index(es):
    • Date
    • Thread