Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!olivea!apple!well!gurgle@well.sf.ca.us From: gurgle@well.sf.ca.us (Pete Gontier) Newsgroups: comp.sys.mac.programmer Subject: Re: How do I get a handle for an existing window? (Think Pascal) Message-ID: <21105@well.sf.ca.us> Date: 9 Oct 90 23:25:34 GMT References: <1990Oct6.063726.19882@agate.berkeley.edu> <21099@well.sf.ca.us> <21103@well.sf.ca.us> Sender: gurgle@well.sf.ca.us Lines: 19 In article <21099@well.sf.ca.us> smoke@well.sf.ca.us (Nicholas Jackiw) writes: >In article <1990Oct6.063726.19882@agate.berkeley.edu> bmyers@garnet.berkeley.ed u (Brian Myers) writes: >>I want to change the title of the Pascal Drawing window from "Drawing" to >>something else. >Pascal can't interfere with the window record's linked list of windows, >however. So if you bring up a topmost but invisible window, take the >ptr to it which NewWindow returns, and look through the list starting >at WindowPeek(theWindow)^.nextWindow, you'll eventually find one >such that WindowPeek(someWindow)^.titleHandle^^='Drawing'. You can >change this title with SetWTitle. Have you actually done this? I remembering trying to do it to the text window. Every once in a while, Pascal calls SetWTitle itself, always with the same string. I'd have had to patch SetWTitle. But that was before I discovered the event loop gets murdered when you run with the text window. Bad news. -- Pete Gontier, gurgle@well.sf.ca.us Software Imagineer, Kiwi Software, Inc.