Re: Scrolling List of Thumbnails?
Re: Scrolling List of Thumbnails?
- Subject: Re: Scrolling List of Thumbnails?
- From: James DiPalma <email@hidden>
- Date: Thu, 17 Jun 2004 11:03:51 -0700
On Jun 17, 2004, at 5:35 AM, Jerry LeVan wrote:
The bad news is that there does not seem to be any easy
way to perform any kind of action by clicking on one of
the images. ( I want to show the image in a larger view)
I just noticed that an editable NSImageCell won't trigger a matrix
target/action. Interesting. Can an NSImageCell be editable? it doesn't
seem to accept image drags, NSCell's editable flag is documented to
control editing of text. Should cells in an NSMatrix in list mode be
tracking mouse events?
An NSmatrix in highlight mode or track mode should be sending mouse
events to its cells, so you probably need some kind of NSActionCell
subclass that displays images how you want them displayed. Embedding an
NSImageCell into an NSActionCell subclass should be pretty easy
(imageCell ivar used whenever needed), but you won't be able to get IB
to create a matrix of NSCells, nor NSActionCells, so maybe an
NSButtonCell subclass that embeds an NSImageCell.
NSMatrix is usually confusing to me since I don't fully understand what
it is doing or even what it is trying to do (or trying to allow me to
do). Considering how matrix mode, cell editability, and cell class can
all affect how mouse events are handled, I'm never surprised when I
can't get NSMatrix to do what I want. Good luck.
I found it *very* difficult to make a connection in IB from
my controller object to the NSMatrix, IB wanted to always
choose the matrix element instead.
There are a few objects that have this problem, like any conglomerate
that includes a scrollview: NSTextView, NSTableView. IB's instances
pane has an outline mode (little buttons on top-right just below tabs)
that can make it easier to target these objects.
-jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.