Design Element
Comment on "Cocoa Sample Code: SimplePicture"
by Scott Stevenson — Oct 24
@Brian: It's not clear to me how the ImageList 'selection' binding knows how to convert the string path to an image in the custom view. Is this default behavior for this key? this part's fuzzy

The binding which is used on the NSImageView subclass is "Value Path" and it's bound to "imagePath" of the currently selection, which is an SPImage object.

This means the view is not bound to an image per se, but rather to the filesystem path to the image. Given that path, NSImageView (and the custom subclass) knows open to open the file and display the image.
Back to "Cocoa Sample Code: SimplePicture"
Design Element

Copyright © Scott Stevenson 2004-2015