<div dir="ltr">Hello, I've got a question about creating applications using wxErlang. This is my first real Erlang project.<div>My question is: which style of handling messages better? I do it as in "Erlang Programming", like this:</div>
<div><br></div><div><div>settings_loop(SettingsWindow) -></div><div><span class="" style="white-space:pre"> </span>receive</div><div><span class="" style="white-space:pre"> </span>#wx{id = ?SAVE_SETTINGS, event = #wxCommand{type = command_button_clicked}} -></div>
<div><span class="" style="white-space:pre"> ...</span></div><div><span class="" style="white-space:pre"> </span>end.</div></div><div><br></div><div>In wxDemo I saw such method of handling:</div><div><br></div><div>-behaviour(wx_object).<br>
</div><div>...</div><div>handle_event(#wx{event = #wxAuiNotebook{type = command_auinotebook_page_close}}, State) -> ...</div><div><br></div><div>What's the difference? And which method should I prefer?</div><div><br>
</div><div>Thanks,</div><div>Yuri</div></div>