Re: How refresh window title
Re: How refresh window title
- Subject: Re: How refresh window title
- From: Alastair Houghton <email@hidden>
- Date: Tue, 4 Aug 2009 16:02:23 +0100
On 4 Aug 2009, at 15:51, McLaughlin, Michael P. wrote:
[snip]
This function is called periodically via the Event Loop. There is one
custom view in the window and it *does* redraw as desired. However,
the
title draws only the first time, giving t = 0 in the title and never
changing.
I would like the title to update with time.
Can anyone point out what I am missing? [Note: The NSString, title,
is a
class member.]
If I had to guess what the problem was, I'd guess that you're using an
NSTimer but that your run loop is not running in the default mode
(maybe you're displaying a sheet or a modal dialog or something?) and
you haven't added the timer to the run loop for the mode it *is*
running in.
As a result, the first invocation is happening (perhaps because the
run loop is in a different mode at that point, perhaps because you're
directly invoking it yourself), but subsequently the timer isn't firing.
At any rate, I don't think the bug is in the code you posted (though I
wouldn't be inclined to use -setViewsNeedDisplay: or the -display
message as you were doing).
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden