Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!rice!sun-spots-request From: jmb%warwick.uucp@nss.cs.ucl.ac.uk (James M Beckett) Newsgroups: comp.sys.sun Subject: Need help with Sunview programming (Notifier doesn't) Message-ID: <961@ubu.warwick.UUCP> Date: 10 Feb 89 07:32:14 GMT Sender: usenet@rice.edu Organization: Computer Science, Warwick University, UK Lines: 43 Approved: Sun-Spots@rice.edu Original-Date: 27 Jan 89 18:16:23 GMT X-Sun-Spots-Digest: Volume 7, Issue 149, message 6 of 13 I'm trying to write a tool-based program for a workstation running under sunview(4.0.1), which creates and draws fractal landscapes. My 3D plotting routines are cheap and nasty and it takes a frog of a long time to complete a 256^2 landscape. I want to have the 'plot' button change to a 'stop' button, which I can select to stop the fractal while it's drawing if it doesn't look too good. Changing the button I can do, however the notifier and I seem to be having a breakdown of communications: I can't persuade it to let me do anything (including resize, move, close etc, let alone select items) while the draw routine is doing its work. The draw routine is itself initially called from the notifier using the PANEL_NOTIFY_PROC argument to panel_create_item, (followed eventually by a window_main_loop(); ) and while drawing the fractal I want to give the notifier a look-in (so that on selection of the 'stop' button it will call a function which sets a global variable which is tested in the draw routine which causes the loop(s) to end etc etc...) On the advice of section 17.6 of the Sunview Programmer's Guide, I've tried dropping a 'notify_dispatch();' inside the drawing loop, but it gets ignored completely; any selections made while the drawing is going on just get queued, and executed when it's done. Other windows on the screen are unaffected, except in that the tool doesn't auto-repaint over them when they are removed from in front of it (understandable, if the notifier isn't getting a chance), nor does it even, in continuing plotting, draw over where a window was, except in the case of some canvases. (not sure of workings..) My theory at the moment is that once a function has been called via the notifier, other events are disabled until the function ends. Is this so? What the zarking fardwarks can I do to enable the action I want, or must I invert my program structure even further? Thanks, -James James Beckett, Computer Science, JANET: jmb@uk.ac.warwick.cs University of Warwick, UUCP: ...!mcvax!ukc!warwick!jmb Coventry CV4 7AL, England. PHONE: +44 203 520995