diff options
Diffstat (limited to 'lib/wx/test/wx_obj_test.erl')
-rw-r--r-- | lib/wx/test/wx_obj_test.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/wx/test/wx_obj_test.erl b/lib/wx/test/wx_obj_test.erl index 23142e28b2..65ecb4f50d 100644 --- a/lib/wx/test/wx_obj_test.erl +++ b/lib/wx/test/wx_obj_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2016. All Rights Reserved. +%% Copyright Ericsson AB 2011-2017. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -79,6 +79,9 @@ handle_cast(What, State = #state{parent=Pid}) -> Pid ! {cast, What}, {noreply, State}. +handle_info({call_undef_fun, {Mod, Fun}}, State) -> + Mod:Fun(), + {noreply, State}; handle_info(What, State = #state{parent=Pid}) -> Pid ! {info, What}, {noreply, State}. @@ -87,6 +90,8 @@ terminate(What, #state{parent=Pid, opts=Opts, user_state=US}) -> case proplists:get_value(terminate, Opts) of undefined -> ok; + {Mod, Fun} -> + Mod:Fun(); Terminate -> Terminate(US) end, |