[ACT-R-users] Strange behavior of (get-mouse-coordinates)

stefano bennati benna86 at gmail.com
Thu May 3 07:44:03 EDT 2012


Hi all ACT-R users,
I have a strange problem with the function (get-mouse-coordinates).
Actually the problem comes from the (cursor-position) function, that is
called by the previous.

Basically, if I load ACT-R and my model in Allegro Lisp, the function is
returning the correct mouse coordinates,
while if I load the model from the ACT-R Environment GUI:

Error:No methods applicable for generic function
> #<STANDARD-GENERIC-FUNCTION NCURSOR-POSITION> with args
> (#<VISIBLE-VIRTUAL-WINDOW @ #x2145c702> #<position 0 0>) of classes
> (VISIBLE-VIRTUAL-WINDOW POSITION)Error in update of Handler: HANDLER7 For
> object: .ENV_WINDOW message: #<Closure (:INTERNAL SEND-ENV-WINDOW-UPDATE 0)
> @ #x21611daa>


 The code is exactly the same...

These are some interesting pieces of code:

(defun init-window ()
>   (setf *screen* (open-exp-window

...


(setq b2 (add-button-to-exp-window

:x x

 :y y

 :height height

 :width  width

 :color color

 :action #'button-pressed)))

 ...


(defun button-pressed (button)

          (print-warning "position ~s"  (cursor-position *screen*))

)


Does somebody have a clue?
Thank you in advance!

Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.srv.cs.cmu.edu/pipermail/act-r-users/attachments/20120503/2d2c7abf/attachment.html>


More information about the ACT-R-users mailing list