aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gs/doc/src/examples/ex14.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-06-27 11:48:03 +0200
committerBjörn Gustavsson <[email protected]>2016-06-27 11:49:57 +0200
commit6931dce17580d097351dd7be09ce7c9ed3f72827 (patch)
tree2456845e95ed0112c2f08ed8ab6e867686b91d7a /lib/gs/doc/src/examples/ex14.erl
parentdfccd57cb2b69fc3ab01acd0ccbfc894a8403358 (diff)
downloadotp-6931dce17580d097351dd7be09ce7c9ed3f72827.tar.gz
otp-6931dce17580d097351dd7be09ce7c9ed3f72827.tar.bz2
otp-6931dce17580d097351dd7be09ce7c9ed3f72827.zip
Remove the gs application
The gs application ws deprecated in R15B01.
Diffstat (limited to 'lib/gs/doc/src/examples/ex14.erl')
-rw-r--r--lib/gs/doc/src/examples/ex14.erl46
1 files changed, 0 insertions, 46 deletions
diff --git a/lib/gs/doc/src/examples/ex14.erl b/lib/gs/doc/src/examples/ex14.erl
deleted file mode 100644
index b35de6cb1c..0000000000
--- a/lib/gs/doc/src/examples/ex14.erl
+++ /dev/null
@@ -1,46 +0,0 @@
--module(ex14).
--copyright('Copyright (c) 1991-97 Ericsson Telecom AB').
--vsn('$Revision: /main/release/2 $ ').
-
--export([start/0,init/0]).
-
-start() -> spawn(ex14, init, []).
-
-init() ->
- Y = [{y,0},{height, 30},{width, 90}],
- R=[{window, [{width, 400},{height, 300}, {title,"editor"},{map, true}],
- [{editor,editor,[{x,0},{y, 35},{width,300},{height,250},
- {insert,{'end',"Edit this text!"}},{vscroll,right}]},
- {button, clear, [{label, {text, "Clear"}},{x,0} | Y]},
- {checkbutton,enable,[{label,{text,"Enable"}},{select,false},{x,100}|Y]},
- {button, time, [{label, {text, "Insert Time"}},{x,200} | Y]},
- {button, quit, [{label, {text, "Quit"}},{x,300} | Y]}]}],
- gs:create_tree(gs:start(),R),
- gs:config(editor,{enable,false}),
- loop().
-
-loop() ->
- receive
- {gs, clear, _, _, _} ->
- io:format("clear editor~n"),
- Enable = gs:read(editor, enable),
- gs:config(editor,{enable, true}),
- gs:config(editor,clear),
- gs:config(editor,{enable, Enable});
- {gs, enable, _, _, [_Txt, _Grp, Enable|_]} ->
- io:format("Enable: ~w~n", [Enable]),
- gs:config(editor,{enable, Enable});
- {gs, time, _, _, _} ->
- TimeStr = io_lib:format("Hr:Min:Sec is now ~w:~w:~w~n",
- tuple_to_list(time())),
- io:format("Insert Time: ~s~n", [TimeStr]),
- Enable = gs:read(editor, enable),
- gs:config(editor,{enable, true}),
- gs:config(editor,{insert, {insert, TimeStr}}),
- gs:config(editor,{enable, Enable});
- {gs, quit, _, _, _} ->
- exit(normal);
- Other ->
- io:format("Other:~w~n",[Other])
- end,
- loop().