Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time ticker



Ronald,

You need to update your time field inside an idle handler. AppleScript will call your idle handler periodically, using the idle interval you supply, and in the meantime, the application uses very little time. In AppleScript Studio, you also need to add the idle handler to your MainMenu.nib file. Here are instructions for adding an idle handler to an existing AppleScript Studio application:

http://tryblock.com/idleinterval/techniques.html#createIdleHandler

Normally, you set the idle interval by returning an integer from your idle handler, or zero to keep the existing value. It defaults to 1 second. AppleScript Studio developers can also use the freeware Idle Interval scripting addition (http://tryblock.com/idleinterval/) to set the idle interval to a fractional value, from any handler in the script.

Hope this helps,

-Stuart


On Mar 6, 2005, at 12:41 AM, Ronald Hofmann wrote:

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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.