in reply to Tkx: "invalid command error" OS X

invalid command name "tk::text"

The message is issued by the Tcl interpreter, so maybe your Tcl/Tk isn't installed properly... (packages missing, or some such)

Enabling debugging might also shed some light on what's going on:

"If the boolean variable $Tkx::TRACE is set to a true value, then a trace of all commands passed to Tcl will be printed on STDERR. This variable is initialized from the PERL_TKX_TRACE environment variable. The trace is useful for debugging and if you need to report errors to the Tcl maintainers in terms of Tcl statements."