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.357.559 Times

Tk::callbacks 804.027

  Date Added: June 21, 2010  |  Visits: 936

Tk::callbacks

Report Broken Link
Printer Friendly Version


Product Homepage
Download (86 downloads)



Tk::callbacks allows specifying code for Tk to call. SYNOPSIS One can specify a callback in one of the following ways: Without arguments: ... => ⊂name, ... ... => sub { ... }, ... ... => methodname, ... or with arguments: ... => [ ⊂name ?, args ...? ], ... ... => [ sub { ... } ?, args...? ], ... ... => [ methodname ?, args...?], ... Perl/Tk has a callback, where Tcl/Tk has a command string (i.e. a fragment of Tcl to be executed). A perl/Tk callback can take one of the following basic forms: Reference to a subroutine ⊂name Anonymous subroutine (closure) sub { ... } A method name methodname Any of these can be provided with arguments by enclosing them and the arguments in []. Here are some examples: $mw->bind($class, " " => Delete); This will call $widget->Delete, the $widget being provided (by bind) as the one where the Delete key was pressed. While having bind provide a widget object for you is ideal in many cases it can be irritating in others. Using the list form this behaviour can be modified: $a->bind(" ",[$b => Delete]); because the first element $b is an object bind will call $b->Delete. Note that method/object ordering only matters for bind callbacks, the auto-quoting in perl5.001 makes the first of these a little more readable: $w->configure(-yscrollcommand => [ set => $ysb]); $w->configure(-yscrollcommand => [ $ysb => set ]); but both will call $ysb->set(args provided by Tk) Another use of arguments allows you to write generalized methods which are easier to re-use: $a->bind(" ",[Next,Page]); $a->bind(" ",[Next,Line]); This will call $a->Next(Page) or $a->Next(Line) respectively. Note that the contents of the [] are evaluated by perl when the callback is created. It is often desirable for the arguments provided to the callback to depend on the details of the event which caused it to be executed. To allow for this callbacks can be nested using the Ev(...) "constructor". Ev(...) inserts callback objects into the argument list. When perl/Tk glue code is preparing the argument list for the callback it is about to call it spots these special objects and recursively applies the callback process to them. EXAMPLES $entry->bind( => [$w , validate, Ev([get])]); $toplevel->bind(all, , [&unobscure, Ev(s)]); $mw->bind($class, , [SetCursor, Ev(UpDownLine,1)]);.

Requirements: No special requirements
Platforms: Linux
Keyword: A- Bind Callback Code For Delete Ev Libraries Programming Tk Tkcallbacks Will Call
Users rating: 0/10

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


TK::CALLBACKS RELATED
Libraries  -  Class::MethodMaker::V1Compat 2.08
Class::MethodMaker::V1Compat is a V1 compatibility code for C::MM. SYNOPSIS This class is for internal implementation only. It is not a public API. Class::MethodMaker version 2 strives for backward-compatiblity with version 1 as far as...
88.06 KB  
Libraries  -  Libsigc++ 2.1.1
libsigc++ implements a full callback system for use in abstract interfaces and general programming. libsigc++ is the most complete library of its kind with the ability to connect an abstract callback to a class method, function, or function...
2.1 MB  
Games  -  Heileen: A Trip To Bavaria for Mac OS 1.0
This free game tells the story of a trip Heileen did for her 16th birthday in a small village in Bavaria. There she will met Magdalene who will become a very good friend, but...what are her real intentions?
5.7 MB  
Development Tools  -  BEM Code for 2D Pulsating Cylinder 1.0
This is the code for calculating solid angle C, surface pressure ps, and field pressure pf coming out from a pulsating cylinder with radius of r and normal velocity vn in an unbounded two dimensional acoustic domain using the solution of Helmholtz...
10 KB  
Development Tools  -  A thin MATLAB wrapper for the Git source control system 1.0
A thin MATLAB wrapper for Git. Short instructions: Use this exactly as you would use the OS command-line verison of Git. Long instructions are: This is not meant to be a comprehensive guide to the near-omnipotent Git SCM:...
10 KB  
Libraries  -  DBI 1.57
DBI is a database independent interface for Perl. SYNOPSIS use DBI; @driver_names = DBI->available_drivers; %drivers = DBI->installed_drivers; @data_sources = DBI->data_sources($driver_name, %attr); $dbh = DBI->connect($data_source,...
481.28 KB  
Science  -  GTfold 1.19
A Scalable Multicore Code for RNA Secondary Structure Prediction
199.87 KB  
Programming  -  JaCC 4 WRL - The Java compiler for WRL 1.0
This project aims to provide a Java-Bytecode compiler for the fairly new programming language WRL and others like PHP4 and Postfix, based on the research on the SableCC parser generator and common W3C.ORG standards.
3.49 MB  
Education  -  moocart 1.0
Moocart is a collection of code for working with Moodle and Zencart. The primary project is Moocash: a Ruby Rails bridge between the two for automatic course enrollments.
1.95 MB  
Science  -  SPINspiral 0.5.1
SPINspiral is a parameter-estimation code for the analysis of gravitational-wave signals detected by LIGO/Virgo.
895.23 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