Changing draggedImage in mid-drag
Changing draggedImage in mid-drag
- Subject: Changing draggedImage in mid-drag
- From: Don McConnell <email@hidden>
- Date: Sun, 16 Sep 2001 08:52:17 -0500
Hello ...
I want to have draggedImage change while being dragged, to
provide some specialized feedback in a game.
My first attempt was, within the 'draggingUpdated' method,
to lockFocus on the draggedImage, draw in my changes, and
then unlockFocus. Nothing appears to happen (perhaps because
I lack of the conceptual equivalent of NSView's 'display' to
update the draggedImage image?).
I'm looking into using NSImageRep, but my early experiments
in just trying to figure out the class haven't worked at all,
and I haven't attempted to use it to solve the draggedImage
problem.
I expect to keep banging away at this problem, but I'm
wondering whether (a) I'm missing something obvious that
would make drawing on the draggedImage work, (b) I need to
be trying a different approach, or (c) I'm attempting
something that simply wasn't meant to be done, in which
case I need to roll my own kind of dragging protocol.
Suggestions?
Also, I asked a week or so ago ("slideImage Problems?" 5
September) about why a draggedImage won't "slide" into
position even though it will "slideBack" in the event of a
failed drag. I still don't have an answer to this one; any
help would still be appreciated.
Thanks and regards,
Don