But if I do my drags & drop REALLY fast,
I get:
dragEnter
dragEnter
dragEnter
drop
3 dragEnter???
How fast is "REALLY fast"? How do you actually accomplish this? I
mean,
what input device do you use, and how do you manipulate it so it goes
really fast?
I have a Apple MightyMouse.
I normal speed I mean, you select finder items and drag them into the
JPanel and drop.
With REALLY fast I mean, I select the finder items and move the mouse
really fast through the JPanel and try to release the mouse button as
soon as I'm in the window or on the way out of it.
I do this simply to test the response of the drag events since there
is a thread which has an animation.
All my drag events print their method name, which they do first of
all, adfter that some other stuff.
In dragEnter(), the animation thread is created & started if it isn't
running already.
But this shouldn't matter because I have a print method at first.
In dragExit or drop, the animation stops which lets the thread exit
its run() method.
Is it possible that 2 of the dragEnter's correspond to lost
dragExit's? Or
do you know for sure that they correspond to lost drop events?
Since the first thing the drag methods do is print out their method
names, it looks like lost events and for dragEnter, to many.
Other than that I really have no idéa.
What machine is this on? What CPU speed? RAM size? Video card?
I ask about these because all these elements play a role in speed.
RAM
size affects speed because if it's small, your machine will swap to
disk,
which really slows things down, often uncontrollably.
G5 Dual 2 GHz
1.5 GB ram
Mac OS 10.4.5, all updates
Java 1.4.2, all updates
ATI Radeon 9800 Pro, 128 MB
Running just Xcode and my app.
or is some cases just a:
dragEnter
where did the dragExit or drop go?
When dragEnter occures a thread starts which has an animation in the
panel, and this never ends since these is no dragExit or drop event.
How long does your DropReactorHandler take when it receives dragEnter?
No time right away.
I realize you start a thread, but do you also build the thread, or
is it
already started and simply waiting for a notify to start animating?
As mentioned above, its created then started in dragEnter.
But this shouldn't matter because I have a print method at first.
For every dragEnter, there should by either dragExit or drop, right?
Latency is critical, and if handlers don't have a low return
latency, it's
possible that the underlying mechanism that eventually produces
drag and
drop Java events will lose information. If that happens, then the
Java
events won't even be created or dispatched.
Also, if the internal state gets confused, then when you drop the
object on
the target, the state may not think it's referring to the object
you're
hovering over on mouse-up, so it might never even reach the point of
creating a drop event if it believes it's over an unreceptive object.
Or it could be there are bugs in DnD in the version of Mac OS X or
Java
you're using.
Can you create a well-isolated test-case, or at least provide more
detail?
-- GG
Here goes:
dragEnter()
{
print("dragEnter")
if( thread is not created or running )
{
thread = new thread
thread.start() -> run()
{
while( runThreadVariable is true )
{
animate stuff
}
}
}
}
dragExit/drop()
{
print("dragExit/drop")
runThreadVariable = false // which will cause the while loop above
to exit
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden
Yours sincerely,
Mohsan Khan.
_______________________________________________________________
Programmer, Animator, Musician
www.xybernic.com
There is no place like 127.0.0.1.
If everybody would give everybody a million would everybody be
millionaires?
Nothing has got to do with anything, and something has got to do with
everything.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden