• 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: A Quick Look contribution and a question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Quick Look contribution and a question


  • Subject: Re: A Quick Look contribution and a question
  • From: Julien Jalon <email@hidden>
  • Date: Tue, 4 Jan 2011 09:09:43 +0100

Look at Apple provided code sample at:

http://developer.apple.com/library/mac/samplecode/QuickLookDownloader/Introduction/Intro.html

--
Julien Jalon

On Monday, January 3, 2011, Brad Stone <email@hidden> wrote:
> I'm submitting this code for anyone who needs a quick hack to get Quick Look working.  It's a hack because it's using AppleScript and the Quick Look Server debug and management tool.  If you send an array of paths this will bring them up in a Quick Look window.
>
> I don't think the Quick Look documentation is as robust as it can be, I'm still trying to figure out how to do the same thing the right way.
>
> - (void)quickLook:(NSArray *)srcPathArray {
>
>         //build the paths string
>         NSString *paths = @"";
>         for (NSString *thisPath in srcPathArray) {
>
>                 NSString *s = @"";
>                 if ([paths length] == 0) {
>                         s = [NSString stringWithFormat:@"(quoted form of (POSIX path of \"%@\"))", thisPath];
>                 } else {
>                         s = [NSString stringWithFormat:@" & \" \" & (quoted form of (POSIX path of \"%@\"))", thisPath];
>                 }
>                 paths = [paths stringByAppendingString:s];
>         }
>
>
>         NSAppleScript *quickLook = nil;
>         // do shell script ("qlmanage -p " & (quoted form of (POSIX path of srcPath)))
>         NSString *command = [NSString stringWithFormat:@"do shell script (\"qlmanage -p \" & %@)",paths];
>         quickLook = [[NSAppleScript alloc] initWithSource:command];
>         [quickLook executeAndReturnError:nil];
> }_______________________________________________
>
> 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
>
_______________________________________________

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: 
 >A Quick Look contribution and a question (From: Brad Stone <email@hidden>)

  • Prev by Date: Re: Missing connection
  • Next by Date: Re: Application that uninstalls itself
  • Previous by thread: Re: A Quick Look contribution and a question
  • Next by thread: Problems with edit text bounding box cell inside a NSOutlineView
  • Index(es):
    • Date
    • Thread