Maybe you could make an Objective-C IBAction method that gives the current
date, instantiate its class in IB, and attach the Text Field's
getStringValue: outlet to it. If I'm not mistaken, that would make it
automatically update the field to the correct current time every time the
window is updated. If you tell the window to update often, it should work
well.
@interface UtilityClass : NSObject
- (IBAction)currentTime:(id)sender;
@end //interface UtilityClass
@implementation UtilityClass
- (IBAction)currentTime:(id)sender
{
return [[NSDate date] description]; //Use
descriptionWithCalendarFormat:timeZone:locale: if you want it pretty...
}
@end //implementation UtilityClass
-----Original Message-----
From: applescript-studio-bounces+tophu=email@hidden
[mailto:applescript-studio-bounces+tophu=email@hidden] On Behalf
Of Ronald Hofmann
Sent: Sunday, March 06, 2005 3:42 AM
To:
Subject: Time ticker
Hi everybody,
I would like to display the current time in a text field. I know how to
do this. However, I want the text field to be updated every second. If
I use a loop, the overall performance of my app decreases dramatically.
In other words, it is doing nothing but this.
Is there another way to do this?
AAAA, tia, Ronald
=======================================
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden
This email sent to email@hidden
References:
>Time ticker (From: Ronald Hofmann <email@hidden>)