Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.337.503 Times

Tk::after 804.027

  Date Added: August 08, 2010  |  Visits: 1.074

Tk::after

Report Broken Link
Printer Friendly Version


Product Homepage
Download (87 downloads)



Tk::after can execute a command after a time delay. SYNOPSIS $widget->after(ms) $id = $widget->after(ms?,callback?) $id = $widget->repeat(ms?,callback?) $widget->afterCancel($id) $id = $widget->afterIdle(callback) $widget->afterInfo?($id)? $id->time(?delay?) This method is used to delay execution of the program or to execute a callback in background sometime in the future. In perl/Tk $widget->after is implemented via the class Tk::After, and callbacks are associated with $widget, and are automatically cancelled when the widget is destroyed. An almost identical interface, but without automatic cancel, and without repeat is provided via Tk::after method. Internal Details The internal Tk::After class has the following synopsis: $id = Tk::After->new($widget, tid, $time, once, callback); $id = Tk::After->new($widget, tid, $time, repeat, callback); $id->cancel; $id->time(?delay?); $id is a Tk::After object, an array of 5 elements: $widget is the parent widget reference. tid is the internal timer id, a unique string. $time is the string idle, representing an idle queue timer, or a integer millisecond value. once or repeat specifies whether the timer is a one-time after event, or a repeating repeat event. callback specifies a Perl/Tk Tk::Callback object. Changing a repeat timer interval Its posible to change a repeat timers delay value, or even cancel any timer, using the time method. If delay is specified and non-zero, a new timer delay is established. If delay is zero the timer event is canceled just as if $id->cancel were invoked. In all cases the current millisecond timer delay is returned. Note: the new timer delay will take effect on the subsequent timer event - this command will not cancel the pending timer event and re-issue it with the new delay time. The after() method has several forms as follows: $widget->after(ms) The value ms must be an integer giving a time in milliseconds. The command sleeps for ms milliseconds and then returns. While the command is sleeping the application does not respond to events. $widget->after(ms,callback) In this form the command returns immediately, but it arranges for callback be executed ms milliseconds later as an event handler. The callback will be executed exactly once, at the given time. The command will be executed in context of $widget. If an error occurs while executing the delayed command then the Tk::Error mechanism is used to report the error. The after command returns an identifier (an object in the perl/Tk case) that can be used to cancel the delayed command using afterCancel. $widget->repeat(ms,callback) In this form the command returns immediately, but it arranges for callback be executed ms milliseconds later as an event handler. After callback has executed it is re-scheduled, to be executed in a futher ms, and so on until it is cancelled. $widget->afterCancel($id) $id->cancel Cancels the execution of a delayed command that was previously scheduled. $id indicates which command should be canceled; it must have been the return value from a previous after command. If the command given by $id has already been executed (and is not scheduled to be executed again) then afterCancel has no effect. $widget->afterCancel(callback) This form is not robust in perl/Tk - its use is deprecated. This command should also cancel the execution of a delayed command. The callback argument is compared with pending callbacks, if a match is found, that callback is cancelled and will never be executed; if no such callback is currently pending then the afterCancel has no effect. $widget->afterIdle(callback) Arranges for callback to be evaluated later as an idle callback. The script will be run exactly once, the next time the event loop is entered and there are no events to process. The command returns an identifier that can be used to cancel the delayed command using afterCancel. If an error occurs while executing the script then the Tk::Error mechanism is used to report the error. $widget->afterInfo?($id)? This command returns information about existing event handlers. If no $id argument is supplied, the command returns a list of the identifiers for all existing event handlers created by the after and repeat commands for $widget. If $id is supplied, it specifies an existing handler; $id must have been the return value from some previous call to after or repeat and it must not have triggered yet or been cancelled. In this case the command returns a list with three elements. The first element of the list is the callback associated with $id, the second element is either idle or the integer timer millisecond value to indicate what kind of event handler it is, and the third is a string once or repeat to differentiate an after from a repeat event. The after(ms) and afterIdle forms of the command assume that the application is event driven: the delayed commands will not be executed unless the application enters the event loop. In applications that are not normally event-driven, the event loop can be entered with the vwait and update commands..

Requirements: No special requirements
Platforms: Linux
Keyword: Callback Command Event Id Libraries Programming Time Timer Tkafter Used To
Users rating: 0/10

License: Freeware Size: 5.7 MB
USER REVIEWS
More Reviews or Write Review


TK::AFTER RELATED
Libraries  -  POE::Component::ControlPort::Command 0.01
POE::Component::ControlPort::Command is a Perl module with register control port commands. SYNOPSIS use POE::Component::ControlPort::Command; POE::Component::ControlPort::Command->register( name => test, topic => sample_commands, usage =>...
12.29 KB  
Libraries  -  GNU Classpath 0.95
GNU Classpath (essential libraries for Java) is a project to create free core class libraries for use with virtual machines and compilers for the Java programming language. GNU Classpath project includes all native methods and core classes...
6.5 MB  
Libraries  -  Lasso 2.0.0
Lasso is a free software C library aiming to implement the Liberty Alliance standards; Lasso defines processes for federated identities, single sign-on and related protocols. Lasso is built on top of libxml2, XMLSec and OpenSSL and is licensed...
1.2 MB  
Networking Tools  -  cdpr 2.2.1
cdpr is used to decode a Cisco Disovery Protocol (CDP) packet, by default it will report the device ID, the IP Address (of the device), and the port number that the machine is connected to. Optionally it will decode the entire CDP packet. This...
24.58 KB  
Libraries  -  Regular Statement String 2.5.7
Regular Statement String (RSS) provides several libraries in C, Java, and COM to implement and demonstrate the key-value development method using well-designed "strings" (RSS) as the media. Regular Statement String also shows a way to write...
337.92 KB  
Code Management Tools  -  PikLoops 0.2.3
PikLoops is a simple KDE program used to generate assembly time delays for Microchip microcontrolers using Microchip instructions. PikLoops is based on a program for Windows, originally created by William J. Boucher. Using his calculation...
573.44 KB  
Libraries  -  CGI::Minimal 1.25
CGI::Minimal is a lightweight CGI form processing package. SYNOPSIS # use CGI::Minimal qw(:preload); use CGI::Minimal; my $cgi = CGI::Minimal->new; if ($cgi->truncated) { &scream_about_bad_form; exit; } my $form_field_value =...
29.7 KB  
Programming  -  Bake 1.0
Bake is a small domain specific programming language for describing how to transform one file into another. Bake uses the typical topological sort, but has features that make describing this relatively easy. Bake has patterns, similar to make,...
94.21 KB  
Audio Tools  -  Fmd2ctl 0.9.0
Fmd2ctl is a command line utility used to control the radio receiver in a SF16-FMD2 soundcard. Options for usage: /usr/local/bin/fmd2ctl [-l level] [-f freq] [-d] [-u] [-s] -l level Set search-level of station to level -f freq Preset...
9.22 KB  
Network & Internet  -  ClusTerm 0.5
ClusTerm is used to SSH into a cluster of systems and execute the same command on all the systems. It combines a number of Gnome Terminal Widgets (VTE) in a single graphical window and copies the input to one terminal to all other terminals....
51.2 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB