[comp.sys.mac.programmer] List Manager Torment

dawson@svax.cs.cornell.edu (Dawson Dean) (12/10/88)

I am trying to write a DA in LSC that uses several ListManager lists.
Specifically, I have two lists that are in the same rectangle - at any
moment only one list is active and I LUpdate only the active list.
Both lists contain text in each cell (list def proc = 0). The lists are
being drawn correctly, the problem comes in selecting cells in either list.

When I get a mouse-down event I call LClick and then LLastClick.
The cell selected always seems to be one cell below and to the right
of the cell that I actually click the mouse in. Partly because of this
(I think) I cannot select cells in the right-most column in a 2-dimensional
list or the bottom rows in a 1-dimensional list; although I CAN drag the
mouse and in that way select these cells. Moreover, I never
get a double-click, even when I click the mouse quickly in the same
cell several times. 

My question is: is there something that I don't know or should
be asuming when reading the InsideMac IV chapter on List Manager.
I mean LClick should track the mouse and select the appropriate
cell right? Is there any weirdness that I should be aware of when
dealing with List Manager events? As far as I can tell, none of the
TechNotes deal with the list manager and I have not been able to find
any sample source code. Is anyone familiar with this problem?

Now, I am probably doing something obviously wrong, but I cannot figure
out what it may be.

Thanks for any suggestions,
Dawson

sho@pur-phy (Sho Kuwamoto) (12/10/88)

In article <23351@cornell.UUCP> dawson@svax.cs.cornell.edu (Dawson Dean) writes:
>
>When I get a mouse-down event I call LClick and then LLastClick.
>The cell selected always seems to be one cell below and to the right
>of the cell that I actually click the mouse in. 

Maybe you are forgetting to translate your mousePt to local coordinates...

>Moreover, I never
>get a double-click, even when I click the mouse quickly in the same
>cell several times. 

Please explain.  As far as I know, the default LDEF does not recognize
double clicks, so if you want it to do something, you have to implement
it yourself.  That means checking for it explicitly by keeping track of
the number of ticks elapsed since the last click and comparing it to the
double click time, as well as implementing whatever you want it to do.

-Sho

bob@accuvax.nwu.edu (Bob Hablutzel) (12/10/88)

> Sho Kuwamoto writes: 
>> Dawson Dean writes:
>>
>>When I get a mouse-down event I call LClick and then LLastClick.
>>The cell selected always seems to be one cell below and to the right
>>of the cell that I actually click the mouse in. 

>Maybe you are forgetting to translate your mousePt to local coordinates...

>>Moreover, I never
>>get a double-click, even when I click the mouse quickly in the same
>>cell several times. 

>Please explain.  As far as I know, the default LDEF does not recognize
>double clicks, so if you want it to do something, you have to implement
>it yourself.  That means checking for it explicitly by keeping track of
>the number of ticks elapsed since the last click and comparing it to the
>double click time, as well as implementing whatever you want it to do.

The standard LDEF doesn't have to recognize double clicks. The list manager,
however, _does_ recognize double clicks, and returns True from LClick when
a double click occurs in a cell.

Bob Hablutzel	BOB@NUACC.ACNS.NWU.EDU