Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!kazim From: kazim@Apple.COM (Alex Kazim) Newsgroups: comp.sys.mac.programmer Subject: Re: GlobalToLocal fails Summary: Find the window Keywords: Mousedown Message-ID: <35179@apple.Apple.COM> Date: 2 Oct 89 16:14:35 GMT References: <35161@apple.Apple.COM> Distribution: usa Organization: Apple Computer Inc, Cupertino, CA Lines: 21 In article <35161@apple.Apple.COM> daveg@apple.com (David Green) writes: > >Upon getting the mousedown event, I set the port to that in the eventMessage. >(hopefully the DA's port, is this always true?) > Ah, the age old problem of finding the target window from the event record. I don't think event.message is defined for mousedown and you need to call: part := FindWindow(event.where, window) which will return the window, and part = inSysWindow for you DA. winodw := event.message works for activate & update events. Hope this helps... =================================================================== Alex Kazim, Apple Computer Phone Repair Man ===================================================================