Erlang Mailing Lists

Author Message

<  Erlang patches mailing list  ~  Incorrect option name used in gs

vance
Posted: Mon Jan 14, 2008 6:50 pm Reply with quote
User Joined: 27 Apr 2005 Posts: 129 Location: Toronto, Ontario, Canada
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.

-Vance

--- ./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} ->
{error,{no_such_file,editor,save,F2,Re}}
end;
- {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 ."]};

_______________________________________________
erlang-patches mailing list
erlang-patches@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-patches
Post recived from mailinglist
View user's profile Send private message Send e-mail
Guest
Posted: Tue Jan 22, 2008 1:20 pm Reply with quote
Guest
Added, thanks.
/Dan

Vance Shipley wrote:
> 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.
>
> -Vance
>
> --- ./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} ->
> {error,{no_such_file,editor,save,F2,Re}}
> end;
> - {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 ."]};
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-patches
>
_______________________________________________
erlang-patches mailing list
erlang-patches@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-patches
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum