On Jan 14, 2011, at 1:00 AM, Uli Kusterer wrote:

> On 14.01.2011, at 01:37, Corbin Dunn wrote:
>> - (void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint
>> 
>> Then do something like this (after converting the screen point to window 
>> coords):
>> 
>>   NSPoint windowPoint = [[view window] mouseLocationOutsideOfEventStream];
>>   NSPoint localPoint = [view convertPoint:windowPoint fromView:nil];
> 
> The OS will be very disappointed if it hands you a screenPoint and you just 
> completely ignore it and use mouseLocationOutsideOfEventStream instead.

Sorry; I had contrived the example from some bits of code I had around. It is 
probably better to use the screenPoint passed to you. There was a reason 
mouseLocationOutsideOfEventStream is used in the above code...but I forget what 
it is.

But, FWIW, the OS won't be disappointed if you do this. It is perfectly 
acceptable. Try dragging an item out of Finder's sidebar on 10.6. If you think 
performance is unacceptable, then please log a bug:

http://bugreporter.apple.com

--corbin


> Due to lag, CPU load etc. It sounds like a better idea to use the parameter.



_______________________________________________

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

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

Reply via email to