Re: Highlighting a valid drop target (serious dead end)
Re: Highlighting a valid drop target (serious dead end)
- Subject: Re: Highlighting a valid drop target (serious dead end)
- From: Corbin Dunn <email@hidden>
- Date: Thu, 20 Apr 2006 10:59:17 -0700
On Apr 20, 2006, at 9:59 AM, Keith Blount wrote:
Thanks for the advice, particularly about not
speculating on methods (that was a tip I picked up
elsewhere and it seemed like a good idea at the time,
but I see now how it might not be and will correct my
code accordingly).
Excellent -- I only mention it because I have run into apps that cause
that very problem (an infinite loop hang).
Unfortunately there are two private methods that I
have had to override in my own
NSOutlineView/NSTableView subclasses:
_drawDropHighlightOnRow: and _highlightColorForCell:.
Super; this is good to know!
What is it not doing
that you want it to do?
Same as the original poster, I need a custom drop
highlight; I also need custom row highight colouring.
Most new Apple apps (well, anything since Panther,
really) have gradient highlights in table/outline
views (see every iApp, Mail etc)
Yup -- this is a specific look; it is defined by as a "Source List" by
our HI Guidelines. So, one of the features you are wanting in
TableView is for a SourceList highlighting style.
and rounded-rect drop
highlights (Finder etc), so apps that use the default
highlighting look ugly and clunky by comparison.
Yes -- I agree. Again, these are all great items to log bugs on. This
bug would be "use a blue round rect to highlight, instead of a black
square".
I
also have a keywords panel that emulates the look of
the one in Aperture (ie. it is mostly nearly black and
is an overlay window), for which I need white
highlighting and drop highlighting (the default black
would hardly be visible). Unfortunately, as things
stand at the moment, I have no way of implementing
these without overriding private methods.
Yup, that is fine. This is an excellent point for wanting to have
these methods (or something similar) to be public.
I would
rather not override private methods (and these are the
only two private methods I override in the thousands
of lines of code in my app), but currently there is no
other way. If I am wrong and there is a supported way
to provide these features, I would be very grateful to
hear about them.
Well, the only way to do it is to always set the drop target to be -1,
and instead, store that drop target somewhere else in your subclass.
Then, in drawRect, draw your own highlighting however you want after
calling super. However, even I will admit it is easier to just
override the private method.
Anyway, as you suggest, I will now head off to the bug
reporter and file an enhancement request on both of
these features, which I should have done months ago.
Excellent! Thank you much. The bugs will get routed to me and I will
look at them for Leopard.
--corbin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden