Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: actnyc!jsb@uunet.uu.net (The Invisible Man) Newsgroups: comp.sys.sun Subject: Re: Need help with Sunview programming (Notifier doesn't) Message-ID: <1257@actnyc.UUCP> Date: 23 Feb 89 14:04:31 GMT References: <961@ubu.warwick.UUCP> Sender: usenet@rice.edu Organization: Diet Software Lines: 21 Approved: Sun-Spots@rice.edu Original-Date: 14 Feb 89 20:43:13 GMT X-Sun-Spots-Digest: Volume 7, Issue 169, message 5 of 12 X-Issue-Reference: v7n149 In article <961@ubu.warwick.UUCP> jmb%warwick.uucp@nss.cs.ucl.ac.uk (James M Beckett) writes: )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...)... Well, there are a couple of things I'd try here: First, don't use window_main_loop() at all. Use explicit dispatching. I think its described in the same section (17.6) or thereabouts. Secondly, instead of using the draw routine as a notify proc, try having the notify proc merely set a flag and return. Then, each time through your dispatching loop, check this flag and call your draw routine if its set, making sure that the draw routine also checks occasionally for pending events (or nothing will change!) If this sort of approach doesn't work, you can always have the draw routine run as a separate process. I've had to do something like that once... jim (uunet!actnyc!jsb)