set i 0; proc evt {} { global i; incr i; puts "Event $i"}
pack [button .a -text "Press Me" -command evt]