Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-lcc!lll-winken!uunet!munnari!murtoa.cs.mu.oz.au!!jkjl From: jkjl@.cs.mu.oz (John Lim) Newsgroups: comp.sys.mac.programmer Subject: Re: TransSkel update events Message-ID: <1335@murtoa.cs.mu.oz.au> Date: 4 Apr 89 09:03:10 GMT References: <16127@dcatla.UUCP> Sender: news@cs.mu.oz.au Reply-To: jkjl@munmurra.UUCP (John Lim) Organization: University of Melbourne, Comp Sci Dept Lines: 37 In article <16127@dcatla.UUCP> dlmnm@dcatla.UUCP () writes: > >The problem is that TransSkel does not provide the window update >procedure with the window pointer. I suppose it assumes the >update procedure is associated with a particular window. For most >events this works fine since FrontWindow can be used to get the >window pointer. In the case where a window other than the one >in front receives an update event, there is no way for the update >procedure to know with which window the event is associated. > >Why isn't the window pointer passed as an argument to this procedure? >Or... am *I* missing something? > Simply use thePort to access your windowPtr. I.e. WindowRecord WRecs[10]; DoUpdate(resized) int resized; { int update_index; for (update_index = 0; update_index < 10 ; update_index++) if (WRecs[update_index] == thePort) break; if (update_index == 10) Debugger(); /* Tough luck ;-( */ /* Do updating */ } Hope this helps. john lim