Make Contract Calls Great Again #35
+8
-5
@@ -276,7 +276,8 @@ handle_cast(Unexpected, State) ->
|
|||||||
|
|
||||||
|
|
||||||
handle_info(retire, State) ->
|
handle_info(retire, State) ->
|
||||||
retire(State);
|
ok = retire(State),
|
||||||
|
{noreply, State};
|
||||||
handle_info(Unexpected, State) ->
|
handle_info(Unexpected, State) ->
|
||||||
ok = log(warning, "Unexpected info: ~tp~n", [Unexpected]),
|
ok = log(warning, "Unexpected info: ~tp~n", [Unexpected]),
|
||||||
{noreply, State}.
|
{noreply, State}.
|
||||||
@@ -295,7 +296,8 @@ handle_event(#wx{event = #wxCommand{type = command_button_clicked}, id = ID},
|
|||||||
ok = copy(State),
|
ok = copy(State),
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
handle_event(#wx{event = #wxClose{}}, State) ->
|
handle_event(#wx{event = #wxClose{}}, State) ->
|
||||||
retire(State);
|
ok = retire(State),
|
||||||
|
{noreply, State};
|
||||||
handle_event(Event, State) ->
|
handle_event(Event, State) ->
|
||||||
ok = tell(info, "Unexpected event ~tp State: ~tp~n", [Event, State]),
|
ok = tell(info, "Unexpected event ~tp State: ~tp~n", [Event, State]),
|
||||||
{noreply, State}.
|
{noreply, State}.
|
||||||
@@ -305,11 +307,12 @@ code_change(_, State, _) ->
|
|||||||
{ok, State}.
|
{ok, State}.
|
||||||
|
|
||||||
|
|
||||||
retire(State = #s{frame = Frame}) ->
|
retire(#s{frame = Frame}) ->
|
||||||
ok = wxWindow:destroy(Frame),
|
wxWindow:destroy(Frame).
|
||||||
{stop, normal, State}.
|
|
||||||
|
|
||||||
|
|
||||||
|
terminate(wx_deleted, _) ->
|
||||||
|
wx:destroy();
|
||||||
terminate(Reason, State) ->
|
terminate(Reason, State) ->
|
||||||
ok = log(info, "Reason: ~tp, State: ~tp", [Reason, State]),
|
ok = log(info, "Reason: ~tp, State: ~tp", [Reason, State]),
|
||||||
wx:destroy().
|
wx:destroy().
|
||||||
|
|||||||
@@ -298,6 +298,8 @@ code_change(_, State, _) ->
|
|||||||
{ok, State}.
|
{ok, State}.
|
||||||
|
|
||||||
|
|
||||||
|
terminate(wx_deleted, _) ->
|
||||||
|
wx:destroy();
|
||||||
terminate(Reason, State) ->
|
terminate(Reason, State) ->
|
||||||
ok = log(info, "Reason: ~tp, State: ~tp", [Reason, State]),
|
ok = log(info, "Reason: ~tp, State: ~tp", [Reason, State]),
|
||||||
wx:destroy().
|
wx:destroy().
|
||||||
|
|||||||
Reference in New Issue
Block a user