<html><body style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;">Dear Friends,<br />Un & Pw are captured in a record Usr from a wx module.<br />Usr is to be stored in mnesia in module(usrdb).<br />export_fun() does not trouble Dialyzer. Mnesia starts, but does not create a new record;<br /><br />export_fun(Pw, Un, Pwv, Unv, Usr) -> <br />case wxPasswordEntryDialog:connect(Pw, command_button_clicked, [{userData, Pwv}]) of<br /> ok -><br /> case wxTextEntryDialog:connect(Un, command_button_clicked, [{userData, Unv}]) of<br /> ok -><br /> register(usrdb, spawn_link(usrdb, handle_cast, [Usr])),<br /> usrdb ! {send, Usr},<br /> F = fun() -> <br /> receive<br /> Usr = #usr_record{un = Unv, pas = Pwv} -><br /> mnesia:write(usr_table, Usr, write)<br /> after 0 -><br /> receive <br /> Any -><br /> Any<br /> end <br /> end<br /> end,<br /> mnesia:transaction(F)<br /> end<br />end,<br />export_fun(Pw, Un, Pwv, Unv, Usr).<br /><br />What does this code lack?<br /><br />Thank you in advance,<br />Peter<br /><br /><br /></body></html>