Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: gfr@cobra.mitre.org (Glenn Roberts) Newsgroups: comp.sys.sun Subject: SunView and Canvases Help Keywords: Windows Message-ID: <8903091253.AA03386@cobra.mitre.org> Date: 13 Mar 89 22:27:34 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 24 Approved: Sun-Spots@rice.edu Original-Date: Thu, 9 Mar 89 07:53:46 EST X-Sun-Spots-Digest: Volume 7, Issue 194, message 15 of 15 X-Issue-Reference: v7n189 > I'm looking for help from anyone who has used SunView on a Sun 386i > The following program is copied almost straight out of the manual. > Unfortunately, it doesn't seem to work. It hangs on the > window_main_loop and waits for me to either type ^C or > close the window to continue. The program you sent in works fine as is, although you should change lines like: #include to just: #include You must understand that SunView is an event-driven windowing system. Once you call window_main_loop() everything that happens from then on must be an 'event'. By setting up event handler routines you can cause things to happen when keys are pressed, the mouse is moved, the window is resized, etc. Once you get the hang of this you'll be pleasantly surprised how powerful this concept is! - Glenn Roberts, The MITRE Corp., McLean VA (703) 883-6820 gfr@cobra.mitre.org