There is no such Tk subcommand. You are looking for [winfo toplevel].