[comp.sys.amiga.tech] Need help with events and ALVs...

f86_linus@tekno.chalmers.se (Sunil 'Linus' Shah) (09/02/89)

Hello World!

   I have been having some trouble with an event-generating
programme I've been working on. It is supposed to generate
mouse movement events, left mouse button up and down events,
which it also does, without fault, it may seam.

   Actually, I have connected a 'hardware device' to
gameport2 of an Amiga 500. A VBlank server is made to read
port2, and when necessary it will Signal() my task when to
send (DoIO()) it's different events.

   Well, so far, it seems to work allright; I can resize
windows, move screens around, click on gadgets etc. The
problems arise as soon as I LoadWb... and are related to
moving disk icons around:

   Click on the icon; it gets selected. Try moving it; the
first move event gets done, but thereafter it seams as if
I'm not holding the icon any more. The icon will move one
event and then stop. I think someones DoIO isn't returning
because generating any more of the system's events will
freeze all event handling, for example pressing RMB. Nothing
happens until a DISKINSERTED is generated, so I just pop a
disk in a drive... and The System will then process the
events that have been piled up.

   This all happens when I use the mouse itself as well!
ie. I can't move any (disk) icons around with it either.

   For mouse movement I do:
      ie.ie_Class = IECLASS_POINTERPOS;
      ie.ie_SubClass = 0;
      ie.ie_Code = NULL;
      ie.ie_Qualifier = NULL;
      ie...x = x_abs;
      ie...y = y_abs;
   Does ie_Qualifier have to be LEFTBUTTON if LMB is
pressed? Haven't seen any differance.


   LMB down:
      ie.ie_Class = IECLASS_RAWMOUSE;
      ie.ie_SubClass = 0;
      ie.ie_Code = IECODE_LBUTTON;
      ie.ie_Qualifier = IEQUALIFIER_LEFTBUTTON;
      ie...x = 0;
      ie...y = 0;

   And up:
      ie.ie_Class = IECLASS_RAWMOUSE;
      ie.ie_SubClass = 0;
      ie.ie_Code = IECODE_LBUTTON | IECODE_UP_PREFIX;
      ie.ie_Qualifier = IEQUALIFIER_LEFTBUTTON;
      ie...x = 0;
      ie...y = 0;


   Also, my mouse movement event DoIO will occasionally 'hang'
(won't return). I suspect the x and y coordinates to be wrong,
(my intserver generating spurious Signals()) but how could
they hang a MOUSEPOS message? 

   Well, I have POPCLI III and ConMan 1.3 running. They don't
effect the programme. I do a 'run myprog' from a CLI started
with NewCLI, and then a 'LoadWb'. Code generated using
Lattice C 4.0 and Lattice Asm 5.0. All runs under 1.2.

---------------
   While I'm at it (asking for help that is), how do I link
succesfully with cback.o? Wanted to link a LSR prog., a
while ago, but BLink (7.2) said Error 515: ALVs were
generated. I think this has been discussed b4, sorry to
repeat it, "didn't think it would happen to me :-)"
---------------

   Could someone help me cure them?
Any help deeply appreciated! Hope to hear from _you_!

Regards :-),

  Linus++;

f86_linus@tekno.chalmers.se

cq dx de sm7nsx!