diff options
author | Dan Gudmundsson <[email protected]> | 2014-03-28 10:13:21 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-03-28 10:13:21 +0100 |
commit | e3f9bf8dbfe4e055753f04125406d29af0ae1050 (patch) | |
tree | 7f56c99e508b1d14a08fe5e9a757ddf4453d414c /lib/observer/src/observer_wx.erl | |
parent | 95ffe7eb374f59ce3f289747212adf042c1cd703 (diff) | |
parent | a7d0e35b834f9b0d9538c75d06dfe3d698a83ded (diff) | |
download | otp-e3f9bf8dbfe4e055753f04125406d29af0ae1050.tar.gz otp-e3f9bf8dbfe4e055753f04125406d29af0ae1050.tar.bz2 otp-e3f9bf8dbfe4e055753f04125406d29af0ae1050.zip |
Merge branch 'dgud/observer/test'
* dgud/observer/test:
observer: Add simple test and add debug hooks in app
Diffstat (limited to 'lib/observer/src/observer_wx.erl')
-rw-r--r-- | lib/observer/src/observer_wx.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl index ecb8e132fe..ced26f7119 100644 --- a/lib/observer/src/observer_wx.erl +++ b/lib/observer/src/observer_wx.erl @@ -19,7 +19,7 @@ -behaviour(wx_object). --export([start/0]). +-export([start/0, stop/0]). -export([create_menus/2, get_attrib/1, get_tracer/0, set_status/1, create_txt_dialog/4, try_rpc/4, return_to_localnode/2]). @@ -69,6 +69,9 @@ start() -> _Obj -> ok end. +stop() -> + wx_object:call(observer, stop). + create_menus(Object, Menus) when is_list(Menus) -> wx_object:call(Object, {create_menus, Menus}). @@ -331,6 +334,10 @@ handle_call({get_attrib, Attrib}, _From, State) -> handle_call(get_tracer, _From, State=#state{trace_panel=TraceP}) -> {reply, TraceP, State}; +handle_call(stop, _, State = #state{frame = Frame}) -> + wxFrame:destroy(Frame), + {stop, normal, ok, State}; + handle_call(_Msg, _From, State) -> {reply, ok, State}. @@ -367,6 +374,10 @@ handle_info({open_link, Pid0}, State = #state{pro_panel=ProcViewer, frame=Frame} end, {noreply, State}; +handle_info({get_debug_info, From}, State = #state{notebook=Notebook, active_tab=Pid}) -> + From ! {observer_debug, wx:get_env(), Notebook, Pid}, + {noreply, State}; + handle_info({'EXIT', Pid, _Reason}, State) -> io:format("Child (~s) crashed exiting: ~p ~p~n", [pid2panel(Pid, State), Pid,_Reason]), |