Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
so i'm just trying to conceptualize how to do this in my head, since i couldn't really find anything in IB, or samples... a real demonstration is in iPhoto where events are allowed to be renamed... i read the documentation about Image Kit's Image Browser, assuming i would be able to rename images inside the image browser, but it only allows for the display of image names.

so... does this make sense? :

1) add mouse events to a label (don't think i can do that?)
2) on double click, convert the label into a text box (cover label, make text box visible).
3) on text entered, convert the label to text box's input, hide text box.
4) register string to user defaults.

thoughts?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Unless you have access to the views/cells that the image browser uses, it might be easier to open a sheet and allow the user to rename inside there.

For saving the data, I wouldn't use user defaults. That's for preferences/settings, not data that is manipulated by the user. The preferred way to store that is in the ~/Library/Application Support/<App Name> directory (for example in a plist).
 

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
i though i'd use NSCollectionView for this instead of the image browser... i find it is more specific to my needs and less overkill since i wouldn't actually have to employ image kit, quartz framework to edit the images i drop into the browser... although, speaking of drop, i'm not sure how difficult it will be to enable NSCollectionView to accept drops, whereas dropping seems fairly straightforward with the image browser...

anyway, so with NSCollectionView i do have access to the cell views... minus using user defaults and instead using the application support folder for the images added to the view, is my proposed method of renaming/changing strings generally the way to go? or is there an easier, more standard way of doing this?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.