NSBrowser headache
NSBrowser headache
- Subject: NSBrowser headache
- From: eblu <email@hidden>
- Date: Sun, 11 Apr 2004 01:14:15 -0400
hi list,
I have a NSBrowser that I am trying to add Drag n Drop support to, and
it is a bit of a headache.
the documentation doesn't exactly explain What happens behind the
scenes (like it used to), and I cannot get a few things to work, any
ideas would be greatly appreciated.
1. during the drag, I highlight the individual cells at the top or the
bottom to indicate where the drop will end up (this is done in my own
BrowserCell subclass, it is not related at all to the Browser's
Highlighting system, as NSBrowser's highlighting system isn't
documented). Currently the bottom Most cell Never highlights on the
bottom. Subsequently, my drops Never show up at the end of my list.
2. I try to "select" my objects as my cursor hovers over them, I do
this by sending both a [self selectRow]; (which I override with my
delegate) and a [[self loadedCellAtRow:rowForDrag
column:collumnForDrag] set]; call.
a. I've noticed that the browser doesn't use my delegate method when
I click on a row with the mouse... but it does when I call it ([self
selectRow]) from my draggingUpdated method. I wish someone could
explain just what the browser Does call when the mouse clicks a Cell.
b. and while i am dragging over my browser, I can only go +1 levels
deep. that is.. I can select any cells, but after they are selected,
the children of only that first level get displayed in the Browser.
This one is irritating as I can find no reason, in MY code why this
would happen... and theres no documentation on it.
c. When I tell my Browser to reloadColumn:(int)column, it
un-highlights the currently selected cell, and then it highlights the
Bottom most cell. This may be because the Browser unWisely identifies
Objects by their names, and As I am trying to Add functionality,
currently all of the objects I use in my browser have the same name.
BTW: I have bypassed the ill-advised string (ex: @"obj1/obj2/obj3...")
based approach to keeping track of the path of the Browser selection.
As I may at any time Need object with the same name, I have left the
job of keeping track of the selected Objects to a separate class that
works with the Delegate, to keep track of the selected objects.
any hints, ideas?
thanks
-ted
_______________________________________________
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.