[erlang-patches] Incorrect option name used in gs

Vance Shipley <>
Mon Jan 14 19:48:59 CET 2008

The patch below corrects the syntax of a configuration for a Tk widget.
With current versions of Tcl/Tk an error message is sometimes displayed
when using gs applications:

   gs error: gstk_port_handler: error in input : unknown option "-sta"

This is caused by the use of an abbreviated version of the option
which controls the state of a (button) widget.  As far back as Tk
version 4.1 it was always documented this way.  I'm not sure when
the abbreviated version stopped working, assuming it once did, however
the full length version has always been the documented method (AFAICT).

The patch below has been tested and does resolve the problem.


--- ./lib/gs/src/gstk_editor.erl        2008-01-14 13:33:30.000000000 -0500
+++ ./lib/gs/src/gstk_editor.erl        2008-01-14 13:33:49.000000000 -0500
@@ -253,8 +253,8 @@
                {bad_result,Re} -> 
-       {enable,      true} -> {c, [Editor, " conf -sta normal"]};
-       {enable,     false} -> {c, [Editor, " conf -sta disabled"]};
+       {enable,      true} -> {c, [Editor, " conf -state normal"]};
+       {enable,     false} -> {c, [Editor, " conf -state disabled"]};
        {setfocus,     true} -> {c, ["focus ", Editor]};
        {setfocus,    false} -> {c, ["focus ."]};

More information about the erlang-patches mailing list