example of Config ?

"Peter J Etheridge" <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.