Interrupting auto-expansion in NSOutlineView
Interrupting auto-expansion in NSOutlineView
- Subject: Interrupting auto-expansion in NSOutlineView
- From: Don Altman <email@hidden>
- Date: Tue, 27 Oct 2009 00:49:02 -0700
Hi,
Does anyone have any insight as to how one could interrupt the auto-
expansion of an item of an NSOutlineView instance? This occurs after a
drag operation enters the item's display area without leaving, for
some predetermined time. The item's outlineView:child:ofItem: method
will then be triggered. For a given folder, this operation might be
very time-consuming, especially if the folder has many children. I'd
like to provide a way for the user to cancel that operation (say, by
moving outside the item's display area before its children have been
displayed). It seems that the outlineView:child:ofItem: method
supersedes event handling, so it's difficult to conceive of a
mechanism for the user to communicate their intention of canceling the
auto-expansion.
The NSDraggingDestination protocol has a draggingEnded: method, which
the documentation says can be used to cancel auto-expansion of a drag
destination. But the method is one of those unimplemented methods, and
I've verified that it's never called. In any case, I don't understand
how the method could be called. When I log the NSDraggingDestination
method calls, they are suspended during the outlineView:child:ofItem:
execution. That would be because everything's running in the same
thread. Can anyone think of a way to make the drag event handling and
the NSOutlineView NSOutlineViewDataSource methods run in different
threads?
This seems to be an instance of a compute intensive operation without
a way of canceling it, short of doing my own mouse tracking and
forgoing the use of the NSDraggingDestination protocol and auto-
expansion in NSOutlineView.
Thanks for any insights you might provide.
Don Altman
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden