How refresh window title
How refresh window title
- Subject: How refresh window title
- From: "McLaughlin, Michael P." <email@hidden>
- Date: Tue, 4 Aug 2009 10:51:15 -0400
- Acceptlanguage: en-US
- Thread-topic: How refresh window title
I know this is supposed to be trivial but none of the permutations I've
tried have worked [Xcode 3.1.3]. My current incarnation is as follows:
-(void)doShowHide:(BOOL)show time:(short)t
{
NSWindow *dispWindow = [dispDoc windowForSheet];
NSString *suffix = [NSString stringWithFormat:@": t = %hd", t];
NSString *fullTitle = [title stringByAppendingString:suffix];
if (show == YES) {
[dispWindow setTitle:fullTitle];
[dispWindow makeKeyAndOrderFront:self];
[dispWindow setViewsNeedDisplay:YES];
[dispWindow display];
}
else
[dispWindow orderOut:self];
}
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.]
Thanks.
--
Mike McLaughlin
_______________________________________________
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