i've been using Apple's ImageBrowser sample code to further understand
the image browser:
http://developer.apple.com/samplecode/ImageBrowser/listing2.html

i'm trying to make the image browser save the images that it displays
by copying any dragged image into it's own folder, and have the image
browser automatically display the contents of that folder whenever the
app launches.

for copying a dragged file into a designated folder (which i would use
to load images on init) i've tried adding the following to the
performDragOperation method, but it doesn't work for me (the desktop
here is just for testing):

if (data)
       {
       NSString *newFolder = @"~/Desktop/";
       newFolder = [newFolder stringByExpandingTildeInPath];
       [data writeToFile: newFolder atomically:YES];

next i (think) i would set user defaults on deleting and reordering of
the images, so that the designated folder would also be in sync with
what is actually displayed in the image browser.  and finally, i would
add code to the initialize method that would populate the image
browser with the images that are inside the designated folder (here,
the desktop).

the problem is i'm lost... hah... also, i'm not familiar with
datasources, so i'm not 100% sure i know what it actually is... i'm
assuming the datasource is the URL of the file that is pasted on the
pasteboard during a drag, but that seems temporary, so how can i set
up a permanent datasource??

if anyone can direct me to some sample code that does exactly (or
close to) this, that would be amazing.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to