Path: utzoo!attcan!uunet!wuarchive!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!es2q+ From: es2q+@andrew.cmu.edu (Erik Warren Selberg) Newsgroups: comp.sys.mac.programmer Subject: re: list bummers Message-ID: Date: 26 Nov 89 05:39:03 GMT Organization: Carnegie Mellon, Pittsburgh, PA Lines: 45 ok, list bummers revised: what appears to be happening is that my DoContentClick() routine isn't handling the mouse position correctly. what I'm doing is passing the FrontWindow and event to the procedure, which is coded thus: procedure DoContentClick (window: windowPtr; theEvent: eventRecord); var tempFile: TFileList; editFile: TFile; dataLen: integer; dummy: boolean; theCell: cell; begin if IsAppWindow(window, tempFile) then begin GlobalToLocal(theEvent.where); if PtInRect(theEvent.where, tempFile.lWindow^.portRect) & tempFile.lList.click(theEvent.where, TheEvent.Modifiers) then begin editFile := tempFile.lList.Get(false, theCell); if editFile <> nil then begin dummy := editFile.edit; tempFile.lList.SetCellInfo(editFile); editFile.Verify(tempFile.lList); end; end; end; end; an explanation: IsAppWindow() returns true if the window is mine, and returns an object in tempFile which contains all the stuff I want to play with. tempFile.lWindow is a windowPtr. tempFile.lList.lClick is simply a call to LClick which uses theEvent.where and theEvent.modifiers, as well as a local list:listHandle variable. the problem seems to be that either PtInRect isn't returning true when it's supposed to, or LClick isn't clicking. I've tried making PtInRect use a variable gpt that's equal to LocalToGlobal(theEvent.where), as well as passing countless variations of GlobalToLocal and LocalToGlobal mutations to both procedures, but both manage to screw up. Any ideas? Erik