Re: Drag highlight problems

2015-07-20 Thread Uli Kusterer
On 20 Jul 2015, at 04:36, John Brownie john_brow...@sil.org wrote:
 Everything works correctly except for the drag highlight. Sometimes, and I 
 haven't been able to work out what the sequence is, the drag highlight will 
 be left on after the drop happens. The problem seems to be some sort of race 
 condition, but I'm finding it hard to track down. Putting logging in each of 
 the three methods makes the problem go away, so that isn't useful.
 
 Am I doing something wrong? I'm on OS X 10.10.4, Xcode 6.4.

Looking at my code here: 
https://github.com/uliwitness/UliKit/blob/master/UKFilePathView.m, I also clear 
my drag highlight in concludeDragOperation:.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Drag highlight problems

2015-07-20 Thread John Brownie

On Mon Jul 20 2015 20:39:12 GMT+1000 (PGT) Uli Kusterer wrote:

On 20 Jul 2015, at 04:36, John Brownie john_brow...@sil.org wrote:

Everything works correctly except for the drag highlight. Sometimes, and I 
haven't been able to work out what the sequence is, the drag highlight will be 
left on after the drop happens. The problem seems to be some sort of race 
condition, but I'm finding it hard to track down. Putting logging in each of 
the three methods makes the problem go away, so that isn't useful.

Am I doing something wrong? I'm on OS X 10.10.4, Xcode 6.4.

Looking at my code here: 
https://github.com/uliwitness/UliKit/blob/master/UKFilePathView.m, I also clear 
my drag highlight in concludeDragOperation:.
Thank you, that seems to work. Why it does is beyond me, though. There's 
only one place where I set the dragHighlight property to YES, and that's 
dragEntered. Do the events sometimes come out of order, or more than 
once? Could I get dragEntered, then performDragOperation, then another 
dragEntered? Why else would setting it to NO in two different methods be 
the solution?


John
--
John Brownie, john_brow...@sil.org or j.brow...@sil.org.pg
Summer Institute of Linguistics  | Mussau-Emira language, Mussau Is.
Ukarumpa, Eastern Highlands Province | New Ireland Province
Papua New Guinea | Papua New Guinea
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com