-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3599133
By: rob_chou
I'm trying to manually create a timer with the following code. It doesn't cause an error but it doesn't do anything either. Any clues?
Timer tm = new Timer( 5000 );
tm.setRepeats( true );
tm.setAttribute( "onTimer", "timerRefresh();", tm.COMPONENT_SCOPE ); tm.setParent( main ); tm.start();
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3599200
By: tomyeh
The concept of component's attributes is similar to that of request's attributes.
It is "storage" to keep data (for your purpose). It is nothing to do with the member or method of the component. (It is unlike JavaScript)
To add an event listener, you have to either call Component.addEventListener, or extend Timer to provide a method called onTimer.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3600109
By: nobody
ok, addEventListener takes a "String evtnm" parameter. What's name for a timer event?
thanks,
rob
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3600764
By: tomyeh
onTimer
Asked: 2006-02-27 08:07:02 +0800
Seen: 530 times
Last updated: Feb 28 '06