30分プログラム、その523。ErlangでGUIにチャレンジ。 プログラミングErlangにはio_widgetというモジュールが登場するけど、これは標準ライブラリではなくて筆者が本のためにつくったモジュールらしい。 調べてみたところ、gs(= Graphic System)モジュールが標準っぽいのでこれを使う。 Ubuntuなら # aptitude install erlang-x11でインストールできる。Macは知らん。 使い方 1> gui_hello:init() ソースコード -module(gui_hello). -compile([export_all]). init() -> Top = gs:start(), Win = gs:create(window,Top,[{width,200},{height,200},{map,true}]), Button = gs:c
![ErlangでGUI(1) - みずぴー日記](https://cdn-ak-scissors.b.st-hatena.com/image/square/7bd8b164fb0ebb729570f039be2e039c3422b920/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fm%2Fmzp%2F20090209%2F20090209071100.png)