Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Bugs and Troubleshooting (http://www.alice.org/community/forumdisplay.php?f=18)
-   -   While a key is pressed (http://www.alice.org/community/showthread.php?t=10063)

chickentree 05-03-2013 01:29 PM

While a key is pressed
 
Are there any guidelines for what movements, calls etc. are allowed during a "While a key is pressed" event?
I have run across several things that seem to through an exception (usually, if not always a null pointer) when I release a key that is generating events using this method. The problem with its sister event "When a key is pressed" is that it is slow, jerky, and does not react until the key is released. Judging from my reading of the error report given in the message window (like trying to read Russian with nothing but a Chinese to English dictionary :)) The method that was being called has vanished in the middle of its execution.
While the error seems to happen eventually when using a method, no matter what is being done in the method, calling another method or function during the event handler is almost guaranteed to cause an exception.

Again, I am just wondering if there are any guidelines on how to avoid this problem when using the While a key is pressed method.

Mark

djslater107 05-04-2013 10:16 AM

While a key is pressed
 
Would it be possible for you to send me a copy of a sample world exhibiting this behavior. I am not quite following what is going on... Please send it [email]don@alice.org[/email].

Thanks,


All times are GMT -5. The time now is 10:05 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.