From gnu@toad.com Thu Mar 30 17:11:08 1989 Date: Wed, 29 Mar 89 20:46:19 PST From: gnu@toad.com (John Gilmore) To: don@brillig.umd.edu, grass@toad.com Subject: Browsing all windows in pspike I was working on debugging with pspike and came up with some cute things for browsing around in the system. I didn't remember how to get a window selected so I could look at it, so I had to figure out how to do it with existing facilities. Eric helped, and the result is... % Above gets all windows event manager prodcesses systemdict /Procs 100 dict put {Procs currentprocess dup put} AllWin % Once you have "Procs", you can do things like: % name pfind dict... % Push all dictionaries on Procs' dict stacks that contain the specified name. /pfind { /Wanted exch def Procs { pop /DictionaryStack get { dup /ps_initialize known not {pop} if } forall } forall } def % Push all the "window" dicts (objects) into "Foo" in systemdict systemdict /Foo 100 dict put {Foo currentdict dup put} AllWin % We are still figuring out how to AllWin something that will catch an % event so that you can point at a window and have it stuff its identity % into a global. Note that you also have to cancel the event catchers % in all the other processes... John PS: How about "opdebug" for Object PostScript Debugger as a better name for pspike? I really want to move it in that direction.