Re: Tooltip Question
Re: Tooltip Question
- Subject: Re: Tooltip Question
- From: Ryan Stevens <email@hidden>
- Date: Mon, 26 May 2003 23:36:09 -0700
On Monday, May 26, 2003, at 02:30 PM, Andreas Mayer wrote:
Am Montag, 26.05.03 um 17:55 Uhr schrieb Ryan Stevens:
I couldn't get it to work right off the bat though. My
subclass was in the way so I tried wedging it in which didn't really
work.
Couldn't you just subclass my class? I don't think it's altering
anything besides adding tooltip handling.
I could've but I hadn't really thought to. :/
and you have to mouse out and back in to get a different tooltip
Well, that's exactly what I was trying to avoid ... :)
My first attempts never really work right. My second attempt gets a
little closer. Somewhere around the 12th attempt it's good to go. ;-)
...at least I try. :-)
I was specifically trying not to redo the tooltips in
reloadData since that gets called far too often (I think).
Hm. I'm not redoing anything in reloadData. I'm just invalidating the
tooltip rectangles. They get recalculated only when a cell is redrawn.
I think there are more actions than changing the number of rows and
resizing that alter cells. What happens when reordering columns? Does
resizing columns call viewWillStartLiveResize?
reloadData "Marks the receiver as needing redisplay [...]" and you're
recalculating the tooltip rects when a cell is redrawn. I call "close
enough". :p
I can't believe I didn't say at the beginning that I was working on a
list-like NSTableView subclass. I hadn't checked whether or not
reordering/resizing columns called viewWillStartLiveResize - doesn't
matter for a single column table(/list). Since you asked, I checked -
it doesn't get called either way.
for (;i<numRows;i++)
[self addToolTipRect:[self rectOfRow:i] owner:self userData:nil];
Isn't this getting slow with large tables? That was the reason why I'm
calculating visible cells only, anyway.
That's on the todo list; Optimize the beans out of it. ;-)
Currently I'm the only user and I've never seen a reason to have more
than 10 items in the list. Maybe someone will want more than that but
by the time it's released (if ever) I'll have had some time to optimize.
Thanks for all your help, it's been much appreciated! :-)
_______________________________________________
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.