I need a way to generate an unused name for Tk toplevel window paths, just like #auto does it for Itcl objects.
How can I do that? Maybe Tk has a similar utility?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When I need unique widget names, I use something like this:
That’s guaranteed to return a widget name that doesn’t exist. (Tk is guaranteed to run single-threaded so you know there are no nasty race conditions.) Use it like this: