PDA

View Full Version : Function Error When Calling GetPosition()


dougeetx
09-07-2010, 06:02 AM
When I drop in a GetPosition() function in order to calculate the distance to an object, I get the following error message:

Drop didn't work.




Alice version: 2.0 04/05/2005

os.name: Windows NT (unknown)

os.version: 6.1

os.arch: x86

java.vm.name: Java HotSpot(TM) Client VM

java.vm.version: 1.3.1_10-b03

user.dir: C:\Users\IndyaBuckley\Desktop\Alice\Alice\Required



Throwable that caused the error:

java.awt.dnd.InvalidDnDOperationException: The operation requested cannot be performed by the DnD system since it is not in the appropriate state

at java.awt.dnd.DropTargetContext.getTransferable(Unk nown Source)

at java.awt.dnd.DropTargetDropEvent.getTransferable(U nknown Source)

at edu.cmu.cs.stage3.alice.authoringtool.editors.resp onseeditor.CompositeComponentResponsePanel.drop(Co mpositeComponentResponsePanel.java:178)

at edu.cmu.cs.stage3.alice.authoringtool.util.Groupin gPanel.drop(GroupingPanel.java:189)

at edu.cmu.cs.stage3.alice.authoringtool.util.Groupin gPanel.drop(GroupingPanel.java:189)

at edu.cmu.cs.stage3.alice.authoringtool.util.Groupin gPanel.drop(GroupingPanel.java:189)

at edu.cmu.cs.stage3.alice.authoringtool.util.Groupin gPanel.drop(GroupingPanel.java:189)

at edu.cmu.cs.stage3.alice.authoringtool.viewcontroll er.PropertyViewController.drop(PropertyViewControl ler.java:1320)

at edu.cmu.cs.stage3.alice.authoringtool.util.Groupin gPanel.drop(GroupingPanel.java:189)

at java.awt.dnd.DropTarget.drop(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer.processDropMe ssage(Unknown Source)

at sun.awt.dnd.SunDropTargetContextPeer.run(Unknown Source)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierar chy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)




I'm running windows7 home premium 64-bit edition. So far, this is the only function that's been giving me an error message. Any guidance would be appreciated.

hgs
09-14-2010, 03:02 PM
"in order to calculate the distance to an object".... from what?
If you have a "what" in the world, then you should not need to work with absolute positions. And since getposition() isn't
working, maybe you need to think about "distance to" a bit more..... (Things in the world have functions associated with them...)