Quicklook and changing previewed image from table
Quicklook and changing previewed image from table
- Subject: Quicklook and changing previewed image from table
- From: Chris Paveglio <email@hidden>
- Date: Thu, 28 Feb 2013 10:57:56 -0800 (PST)
I'm building an app that has a table view which holds paths of images. I have enabled quicklook so I can press space bar and the preview window will show up. I can view 1 image and close the preview and show another image preview. But if I have the quicklook preview panel displayed, it won't update the image displayed, when I use the arrow key to scroll up/down in the table. I am pretty sure I need to call
[[QLPreviewPanel sharedPreviewPanel] refreshCurrentPreviewItem];
//or the name of the panel instance itself
But where do I do that?
I have a tableView class that intercepts keystrokes to call the panel toggle on spacebar, and it will change the table selection too.
//inside of tableView subclass
- (void)keyDown:(NSEvent *)theEvent
{
NSString* key = [theEvent charactersIgnoringModifiers];
if([key isEqual:@" "]) {
[[[self window] windowController] togglePreviewPanel];
} else {
[super keyDown:theEvent];
}
}
I tried putting the refresh... call inside of the else block, but that didn't do anything. Would something go in my tableView, or the WindowController (which is where the panel is created)?
Thanks,
Chris
_______________________________________________
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