refresh issue with QLPreviewPanel..!
refresh issue with QLPreviewPanel..!
- Subject: refresh issue with QLPreviewPanel..!
- From: Naresh Kongara <email@hidden>
- Date: Mon, 31 Aug 2009 15:21:33 +0530
Hi,
I have an app in which i need to display the view to be printed in
QuickLook preview. For this i thought os using the
(QlPreviewPanel)QuickLookUI.framework which is available at /System/
Library/PrivateFrameworks.
QLPreviewPanel class is obtained using
#define QLPreviewPanel NSClassFromString(@"QLPreviewPanel")
and the QuickLookUI framework is loaded as below.
[[NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/
QuickLookUI.framework"] load];
Using NSPrintOperation i'm saving the View to be printed a path say
PDFPath.
Then i'm passing the PDFPath URL to previewPanel as below.
[[QLPreviewPanel sharedPreviewPanel] setURLs:[NSArray
arrayWithObject:[NSURL fileURLWithPath:PDFPath]]];
[[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront:self];
The above code is working fine for the first time. If i close the
panel and change the view to be printed(Which inturn changes the
file at PDFPath).Now if the panel is shown again with above 2 lines
of code then the panel is not showing the updated one, it is showing
the previous view only.
If we wait for some time to show the panel, then it is showing the
correct view only.
There is no problem with file at PDFPath.
I don't know why the preview panel is taking the time to refresh.
If any one has the idea on it, Please let me know.
Thanks,
Naresh Kongara
email@hidden
_______________________________________________
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