Re: Avoiding flicker when dropping in a view
Re: Avoiding flicker when dropping in a view
- Subject: Re: Avoiding flicker when dropping in a view
- From: Serge Meynard <email@hidden>
- Date: Wed, 16 Mar 2005 10:14:24 -0500
Sorry for the repost, but I'm really wondering if anyone has faced (and
hopefully resolved) this same type of issue... I talked about
successful drops originally, but of course the same problem really
applies to slidebacks as well.
I have a custom view that contains various objects, and I have
implemented drag-and-drop to allow me to move them around. When I
start dragging a selected object, I stop displaying it in my drawRect:
method and let the drag-and-drop system handle drawing it in overlay.
All this works just fine. The problem comes when I drop the object...
The drag-and-drop code removes the overlay BEFORE I get any drop
callbacks, and as a result there is an annoying flicker before I get a
chance to redraw the object in its new position (which is exactly
where the overlay was being displayed only a moment before). Before I
fully understood that bit, I had tried a few workarounds, but
obviously none of them worked; the best I was able to do was to
minimize the flicker's duration.
Before I start considering any seriously inelegant bits of code to
work around this problem, does anyone have any (clean) suggestions?
Obviously, the point here is to act only when the drop occurs;
anything else would invalidate the whole point of the OS managing an
overlay for me! And no, I don't want to roll my own drag-and-drop
code; the objects can be dragged from one window to another within the
app so it's not entirely trivial. If I have to choose, I prefer living
with a bit of flickering to reinventing the wheel.
Serge
_______________________________________________
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