I previously had a single-column collection view. Each element corresponded to a file. If you hit space while an element was selected, you'd get the quicklook. If you double-clicked, you'd open the file. So that looked like this:
Element Element Element This was implemented as an NSCollectionView because each element had multiple bits of information to display in its view. New feature: each element can now correspond to one or more files. The desired appearance expands the single column into what looks like two columns, like this: ----- Element File 1 ----- Element File 1 File 2 ----- Element File 1 File 2 File 3 File 4 File 5 It would be nice if each NSCollectionItemView could be a different height, to accommodate all the files, but NSCollectionView doesn't support this. My first attempt was to embed an NSTableView in the righthand side of each NSCollectionItemView, and do a little observeValueForKeyPath:ofObject:change:context hackery to notice when the backing NSArrayController changed and attach/reattach the dataSources of the NSTableViews. (At times, the NSArrayController will get a different backing array.) That didn't work because the tables wouldn't update until the user clicked somewhere in the user interface. I thought of using an NSTextView-with-scrollbar and having each filename be on a new line, but starting down that path makes it seem like a lot of work, as would be some sort of NSMatrix or a custom view. A user looking at the display will be interested in seeing the filenames for multiple elements, so a master/detail interface would be unsatisfactory. Anyone have any suggestions for the right element-container and file-within-element-container classes to use? ----- Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Author of /Ring/ (forthcoming; sample: http://exampler.com/tmp/ring.pdf) www.exampler.com, www.exampler.com/blog, www.twitter.com/marick _______________________________________________ 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 arch...@mail-archive.com