discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask waitUntilExit & recursive display calls


From: Nicola Pero
Subject: Re: NSTask waitUntilExit & recursive display calls
Date: Thu, 30 Jan 2003 04:56:20 +0000 (GMT)

> Hi folks,
> 
> could someone answer the following question, please.
> 
> I have a view that needs some data (process output) in order to
> display itself. I trigger an NSTask when the view first gets a
> "displayIfNeeded" and it obtains the data.

Hmmm.  Are you sure this is a good idea ?

I would rather have the view get the data when you create it (in its
-initXXX method).

To get the data again, either use a timer to get the data at regular
intervals (say, every second, and each time you get new data, mark the
view as needing a redisplay).

Or, if you want the user to control when the data should be refreshed, put
a 'Refresh' button in your window - the user will refresh the data by
clicking the button.

As a general philosophy I think it's best if you prepare yourself for
drawing beforehand, by getting the data beforehand, and when the moment of
drawing arrives, you just draw with the data you have.  That makes things
simpler.  :-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]