Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

[bind] and multiple event handlers
Hi!

I'm trying to set 2 different handlers for one event, by the following:

bind $w <Enter> "puts {it's an enter}"
bind $w <Enter> +"puts {this is the second handler for enter}"

but I got error message: "extra characters after close-bracket", so
I've tried to replace line
bind $w <Enter> +"puts {this is the second handler for enter}"
with line
bind $w <Enter> +"; puts {this is the second handler for enter}"
but it haven't hepled.
Any hints?

--
Pozdrawiam (Greetings)!
Googie

Report this thread to moderator Post Follow-up to this message
Old Post
Googie
10-14-04 09:00 PM


Re: [bind] and multiple event handlers
Hello,

Try:

bind $w <Enter> "puts {it's an enter}"
bind $w <Enter> "+puts {this is the second handler for enter}"

or:

bind $w <Enter> [list +puts {this is the second handler for enter}]

Regards,

--
Ramon Ribó
http://gatxan.cimne.upc.es/ramsan

"Googie" <googie@no.spam.org> escribió en el mensaje
news:cklrn3$fup$1@atlantis.news.tpi.pl...
> Hi!
>
> I'm trying to set 2 different handlers for one event, by the following:
>
> bind $w <Enter> "puts {it's an enter}"
> bind $w <Enter> +"puts {this is the second handler for enter}"
>
> but I got error message: "extra characters after close-bracket", so
> I've tried to replace line
> bind $w <Enter> +"puts {this is the second handler for enter}"
> with line
> bind $w <Enter> +"; puts {this is the second handler for enter}"
> but it haven't hepled.
> Any hints?
>
> --
> Pozdrawiam (Greetings)!
> Googie



Report this thread to moderator Post Follow-up to this message
Old Post
Ramon Ribó
10-14-04 09:00 PM


Re: [bind] and multiple event handlers
"Googie" <googie@no.spam.org> wrote in message
news:cklrn3$fup$1@atlantis.news.tpi.pl...
> Hi!
>
> I'm trying to set 2 different handlers for one event, by the following:
>
> bind $w <Enter> "puts {it's an enter}"
> bind $w <Enter> +"puts {this is the second handler for enter}"
>
> but I got error message: "extra characters after close-bracket", so
> I've tried to replace line
> bind $w <Enter> +"puts {this is the second handler for enter}"
> with line
> bind $w <Enter> +"; puts {this is the second handler for enter}"
> but it haven't hepled.
> Any hints?
>
> --
> Pozdrawiam (Greetings)!
> Googie

Does it work as a single bracketed element, e.g.

bind $w <Enter> {puts {it's an enter}; puts {this is the second handler for
enter}}

?





Report this thread to moderator Post Follow-up to this message
Old Post
Rufus V. Smith
10-21-04 09:04 PM


Re: [bind] and multiple event handlers
Dnia Thu, 21 Oct 2004 11:02:01 -0400, Rufus V. Smith skrobie:

> "Googie" <googie@no.spam.org> wrote in message
> news:cklrn3$fup$1@atlantis.news.tpi.pl... 

> Does it work as a single bracketed element, e.g.

> bind $w <Enter> {puts {it's an enter}; puts {this is the second handler fo
r
> enter}}

> ?

This maybe works, but only in theory. In practice, when you bind two handler
s
for one event, you do this in separate, far from each other, places. This
solution would never fit for it - will you read current setting and append n
ew
parts of code?



--
//  _    ___         Michal "Sektor" Malecki <sektor(whirl)kis.p.lodz.pl>
\\ L_ |/ `|  /^\ ,()                         <ethourhs(O)wp.pl>
// \_ |\  \/ \_/ /\ C++ bez cholesterolu: http://www.intercon.pl/~sektor/cbx
"Java does not have pointers!"

Report this thread to moderator Post Follow-up to this message
Old Post
Sektor van Skijlen
10-21-04 09:04 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:57 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.