Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageHello,
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
Post Follow-up to this message
"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}}
?
Post Follow-up to this messageDnia 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!"
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.