Holiday Teaser 0: CKFrameworks

December 11th, 2007 by Joe Ranieri

To start off our teasing, I’ve decided to show off something neat that I’ve been working on.

Function Thumbnail(extends file as FolderItem) as Picture
  // import QuickLook into the CKFrameworks namespace
  CKFrameworks.import("QuickLook")
 
  // set up our options
  dim options as new Dictionary()
  options.value(CKFrameworks.kQLThumbnailOptionIconModeKey) = true
 
  // and grab the thumbnail
  return CKFrameworks.QLThumbnailImageCreate(CKFrameworks.kCFAllocatorDefault, _
    file, CKFrameworks.CGSizeMake(width, height), options).rbValue
End Function

You might be asking yourself, why is this impressive? Well, it’s impressive because it’s all looked up at runtime (and type checked!). All the code you see is all the code there is - no declares or mucking around with CFBundles :-) .

Mind you this wasn’t my actual goal (it’s part of something far bigger and far cooler) but I thought it was cool. Let the speculation begin!


COMMENTS

2 Responses to “Holiday Teaser 0: CKFrameworks”

  1. norman Says:

    Looks very cool !
    Looking forward to seeing what lead to this discovery being released :)

  2. Thomas Tempelmann Says:

    I am clueless and curious

Leave a Reply