ex1:
#!/usr/bin/wish
toplevel .dialog
button .dialog.ok -text "OK" -command {
destroy .dialog
}
pack .dialog.ok
ex2:
#!/usr/bin/wish
toplevel .dialog
button .dialog.ok -text "OK"
bind .dialog.ok <Enter> {
destroy .dialog
}
bind .dialog.ok <Button-1> {
destory .dialog
}
ex2 report "Error: invalid command name .dialog.ok" while ex1 is ok. why is happen? and how to write this script ?
#!/usr/bin/wish
toplevel .dialog
button .dialog.ok -text "OK" -command {
destroy .dialog
}
pack .dialog.ok
ex2:
#!/usr/bin/wish
toplevel .dialog
button .dialog.ok -text "OK"
bind .dialog.ok <Enter> {
destroy .dialog
}
bind .dialog.ok <Button-1> {
destory .dialog
}
ex2 report "Error: invalid command name .dialog.ok" while ex1 is ok. why is happen? and how to write this script ?