SunView and Canvases Help

Glenn Roberts gfr at cobra.mitre.org
Tue Mar 14 08:27:34 AEST 1989


> 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 </usr/cluster/devel/sunview_devel/include/suntool/sunview.h>

to just:

  #include <suntool/sunview.h>

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 at cobra.mitre.org



More information about the Comp.sys.sun mailing list