example of Config ?
Peter J Etheridge
petergi@REDACTED
Sun Sep 5 07:17:44 CEST 2021
Dear Erlangers,
Reading from the application module;
https://erlang.org/doc/man/application.html
set_env(Config) -> ok
set_env(Config, Opts) -> ok
Types
Config = [{Application, Env}]
Application = atom()
Env = [{Par :: atom(), Val :: term()}] ...
From a wx:demo() example;
https://github.com/erlang/otp/blob/master/lib/wx/examples/demo/ex_notebook.erl
-module(ex_notebook).
-include_lib("wx/include/wx.hrl")
-behaviour(wx_object).
-export([start/1, init/1, terminate/2, code_change/3,
handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-record(state,
{
parent,
config,
notebook
}).
start(Config) ->
wx_object:start_link(?MODULE, Config, []).
%%
init(Config) ->
wx:batch(fun() -> do_init(Config) end).
do_init(Config) ->
Parent = proplists:get_value(parent, Config), ...
Between the application module and the wx example above, I doubt this
would be the same Config.
Could someone kindly post a URL to an example of what Config might be
for wx_object?
Thank you in advance,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20210905/a676dadf/attachment.htm>
More information about the erlang-questions
mailing list