Hi,
I had a particular binding in Tk3.6 as
set event "if \{\[ap_filter_uplownum %A \[%W get\] $length\]\} \{%W insert \[%W index insert\] \[string toupper %A\]\}"
eval bind $entry <Any-KeyPress> $event
And, procedure ap_filter_uplownum is defined as
proc ap_filter_uplownum { key entry length} {
if { [ string length $entry ] >= $length } {
return 0
}
if {(($key>="A"
&& ($key<="Z"
) || (($key>="a"
&& ($key<="z"
) || (($key>="0"
&& ($key<="9"
) || ($key=="_"
|| ($key=="."
} {
return 1 }
return 0
}
Now, I want to migrate the same to tk8.4, this binding is not get affected.
I had tried using:
1) break statement, then I am getting a TCL error.
2) I had tried using return -code break in procedure ap_filter_uplownum but, then no TCL error,, but binding is not invoked.
Can any one please help me out.
Thnaks in advance
Ram
I had a particular binding in Tk3.6 as
set event "if \{\[ap_filter_uplownum %A \[%W get\] $length\]\} \{%W insert \[%W index insert\] \[string toupper %A\]\}"
eval bind $entry <Any-KeyPress> $event
And, procedure ap_filter_uplownum is defined as
proc ap_filter_uplownum { key entry length} {
if { [ string length $entry ] >= $length } {
return 0
}
if {(($key>="A"
return 1 }
return 0
}
Now, I want to migrate the same to tk8.4, this binding is not get affected.
I had tried using:
1) break statement, then I am getting a TCL error.
2) I had tried using return -code break in procedure ap_filter_uplownum but, then no TCL error,, but binding is not invoked.
Can any one please help me out.
Thnaks in advance
Ram