]> git.saurik.com Git - cydget.git/blobdiff - PhotoExample.cydget/index.html
Simplified 4.x-compatible menu state-machine.
[cydget.git] / PhotoExample.cydget / index.html
index ff28b98ac9d7d71aff0ac3fb6bf9a0cd9191e8b1..2e51892acc42b4cc4f5df7b42573ff6c6660a067 100644 (file)
         document.write('</div>');
 
         dlopen("/System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary", RTLD_GLOBAL);
-        var album = PLCameraAlbum.sharedInstance.images;
+        var album = [[PLCameraAlbum sharedInstance] images];
 
         var jpeg = null, length = album.length;
         for (var i = 0; i != 5; ++i) {
-            jpeg = album[Math.floor(Math.random() * length)].fileGroup.pathForFullSizeImage;
+            jpeg = [[album[Math.floor(Math.random() * length)] fileGroup] pathForFullSizeImage];
             if (jpeg != null)
                 break;
         }
 
         if (jpeg == null)
             for (var i = 0; i != length; ++i) {
-                jpeg = album[Math.floor(i)].fileGroup.pathForFullSizeImage;
+                jpeg = [[album[Math.floor(i)] fileGroup] pathForFullSizeImage];
                 if (jpeg != null)
                     break;
             }