Re: Config in wx examples

arif <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <[email protected]>
Hi,
The example source code is a bit misleading because it is called by demo:load_example/2
So Config would be a propslist with members parent, demo_sz and log
It's instructive to look at that code. It's in the example directory of wx library
Regards
Arif

> On 29 May 2021, at 07:37, Peter J Etheridge <[email protected]> wrote:
> 
> 
> Dear Erlangers,
> 
> In this module from the manual;
> 
> 
> -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, []).
> .....
> 
> 
> Apart from the argument being a variable and a data field in the state record, in this context what is Config ?
> 
> 
> 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.