aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-12-07 15:13:24 +0100
committerDan Gudmundsson <[email protected]>2011-12-09 14:53:04 +0100
commit44d21ab66987c4dc4df461901600618efd2907c3 (patch)
treef19c657ef344c79a0420619e5695f58e188fa419
parent7fdc3f2f145c0b2f4785b5efec522218d0080cf6 (diff)
downloadotp-44d21ab66987c4dc4df461901600618efd2907c3.tar.gz
otp-44d21ab66987c4dc4df461901600618efd2907c3.tar.bz2
otp-44d21ab66987c4dc4df461901600618efd2907c3.zip
[wx] Add handle_cast to avoid behaviour warning
-rw-r--r--lib/debugger/src/dbg_wx_filedialog_win.erl7
-rw-r--r--lib/wx/examples/demo/demo.erl8
-rw-r--r--lib/wx/examples/demo/ex_aui.erl8
-rw-r--r--lib/wx/examples/demo/ex_button.erl8
-rw-r--r--lib/wx/examples/demo/ex_canvas.erl8
-rw-r--r--lib/wx/examples/demo/ex_canvas_paint.erl8
-rw-r--r--lib/wx/examples/demo/ex_choices.erl8
-rw-r--r--lib/wx/examples/demo/ex_cursor.erl8
-rw-r--r--lib/wx/examples/demo/ex_dialogs.erl8
-rw-r--r--lib/wx/examples/demo/ex_frame_utils.erl8
-rw-r--r--lib/wx/examples/demo/ex_gauge.erl8
-rw-r--r--lib/wx/examples/demo/ex_gl.erl8
-rw-r--r--lib/wx/examples/demo/ex_graphicsContext.erl8
-rw-r--r--lib/wx/examples/demo/ex_grid.erl8
-rw-r--r--lib/wx/examples/demo/ex_htmlWindow.erl8
-rw-r--r--lib/wx/examples/demo/ex_listCtrl.erl7
-rw-r--r--lib/wx/examples/demo/ex_notebook.erl9
-rw-r--r--lib/wx/examples/demo/ex_pickers.erl9
-rw-r--r--lib/wx/examples/demo/ex_popupMenu.erl9
-rw-r--r--lib/wx/examples/demo/ex_radioBox.erl7
-rw-r--r--lib/wx/examples/demo/ex_sashWindow.erl8
-rw-r--r--lib/wx/examples/demo/ex_sizers.erl8
-rw-r--r--lib/wx/examples/demo/ex_slider.erl8
-rw-r--r--lib/wx/examples/demo/ex_splitterWindow.erl8
-rw-r--r--lib/wx/examples/demo/ex_static.erl8
-rw-r--r--lib/wx/examples/demo/ex_textCtrl.erl8
-rw-r--r--lib/wx/examples/demo/ex_treeCtrl.erl8
-rw-r--r--lib/wx/examples/sudoku/sudoku_board.erl8
-rw-r--r--lib/wx/examples/sudoku/sudoku_gui.erl8
29 files changed, 175 insertions, 57 deletions
diff --git a/lib/debugger/src/dbg_wx_filedialog_win.erl b/lib/debugger/src/dbg_wx_filedialog_win.erl
index 9f45ad0c47..f109652a70 100644
--- a/lib/debugger/src/dbg_wx_filedialog_win.erl
+++ b/lib/debugger/src/dbg_wx_filedialog_win.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,7 +24,7 @@
-export([new/3, getFilename/1, getFilenames/1, getDirectory/1, destroy/1]).
%% Internal
--export([init/1, handle_call/3, handle_event/2,
+-export([init/1, handle_call/3, handle_event/2, handle_cast/2,
handle_info/2, code_change/3, terminate/2]).
-include_lib("wx/include/wx.hrl").
@@ -193,6 +193,9 @@ handle_call(getDirectory, _From, State = #state{path=Dir}) ->
handle_call(destroy, _From, State) ->
{stop, normal, ok, State}.
+handle_cast(_, State) ->
+ {noreply, State}.
+
%% events
handle_event(#wx{id=?wxID_UP}, State0) ->
State = update_window(change_dir(0, State0)),
diff --git a/lib/wx/examples/demo/demo.erl b/lib/wx/examples/demo/demo.erl
index 59c20e09fb..61e71af021 100644
--- a/lib/wx/examples/demo/demo.erl
+++ b/lib/wx/examples/demo/demo.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,7 +27,7 @@
-behaviour(wx_object).
-export([start/0, start/1, start_link/0, start_link/1, format/3,
init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-record(state, {win, demo, example, selector, log, code}).
@@ -189,6 +189,10 @@ handle_call(Msg, _From, State) ->
io:format("Got Call ~p~n",[Msg]),
{reply,ok,State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
%% Async Events are handled in handle_event as in handle_info
handle_event(#wx{event=#wxCommand{type=command_listbox_selected, cmdString=Ex}},
State = #state{demo={_,DemoSz}, example=Example, code=Code}) ->
diff --git a/lib/wx/examples/demo/ex_aui.erl b/lib/wx/examples/demo/ex_aui.erl
index 6adfd970fc..50f077638d 100644
--- a/lib/wx/examples/demo/ex_aui.erl
+++ b/lib/wx/examples/demo/ex_aui.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include("../../include/wx.hrl").
@@ -92,6 +92,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
%% Async Events are handled in handle_event as in handle_info
handle_event(#wx{obj = Notebook,
event = #wxCommand{type = command_button_clicked}},
diff --git a/lib/wx/examples/demo/ex_button.erl b/lib/wx/examples/demo/ex_button.erl
index 28c8273cb9..0dd0363933 100644
--- a/lib/wx/examples/demo/ex_button.erl
+++ b/lib/wx/examples/demo/ex_button.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,7 +26,7 @@
-behaviour(wx_object).
-export([start/1, init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-record(state,
{
@@ -153,6 +153,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config,"Got Call ~p~n",[Msg]),
{reply,ok,State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_canvas.erl b/lib/wx/examples/demo/ex_canvas.erl
index 844c7eddf3..1ec4760f40 100644
--- a/lib/wx/examples/demo/ex_canvas.erl
+++ b/lib/wx/examples/demo/ex_canvas.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2, handle_sync_event/3]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2, handle_sync_event/3]).
-include_lib("wx/include/wx.hrl").
@@ -144,6 +144,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_canvas_paint.erl b/lib/wx/examples/demo/ex_canvas_paint.erl
index 38d6b62f1d..9bc083766a 100644
--- a/lib/wx/examples/demo/ex_canvas_paint.erl
+++ b/lib/wx/examples/demo/ex_canvas_paint.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2, handle_sync_event/3]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2, handle_sync_event/3]).
-include_lib("wx/include/wx.hrl").
@@ -211,6 +211,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_choices.erl b/lib/wx/examples/demo/ex_choices.erl
index 75f8d22493..2e456ae249 100644
--- a/lib/wx/examples/demo/ex_choices.erl
+++ b/lib/wx/examples/demo/ex_choices.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,7 +21,7 @@
-behaviour(wx_object).
-export([start/1, init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -147,6 +147,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config,"Got Call ~p\n",[Msg]),
{reply, {error,nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_cursor.erl b/lib/wx/examples/demo/ex_cursor.erl
index 322bdcbb6c..c1a558541b 100644
--- a/lib/wx/examples/demo/ex_cursor.erl
+++ b/lib/wx/examples/demo/ex_cursor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -135,6 +135,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_dialogs.erl b/lib/wx/examples/demo/ex_dialogs.erl
index 020e9eeb14..b39344f8b1 100644
--- a/lib/wx/examples/demo/ex_dialogs.erl
+++ b/lib/wx/examples/demo/ex_dialogs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -153,6 +153,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_frame_utils.erl b/lib/wx/examples/demo/ex_frame_utils.erl
index 3064c9f3b7..a90642b355 100644
--- a/lib/wx/examples/demo/ex_frame_utils.erl
+++ b/lib/wx/examples/demo/ex_frame_utils.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -102,6 +102,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_gauge.erl b/lib/wx/examples/demo/ex_gauge.erl
index d30c3fea58..ffc667ff05 100644
--- a/lib/wx/examples/demo/ex_gauge.erl
+++ b/lib/wx/examples/demo/ex_gauge.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,7 +23,7 @@
-include_lib("wx/include/wx.hrl").
-export([start/1, init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-record(gauge, {obj,
value,
@@ -118,6 +118,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config,"Got Call ~p\n",[Msg]),
{reply,ok, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
%% Async Events are handled in handle_event as in handle_info
handle_event(#wx{id = ?ID_START_STOP,
event = #wxCommand{type = command_togglebutton_clicked,
diff --git a/lib/wx/examples/demo/ex_gl.erl b/lib/wx/examples/demo/ex_gl.erl
index 53f1eda847..72dad2cf9d 100644
--- a/lib/wx/examples/demo/ex_gl.erl
+++ b/lib/wx/examples/demo/ex_gl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,7 +21,7 @@
-behaviour(wx_object).
-export([init/1, code_change/3, handle_info/2, handle_event/2,
- handle_call/3, terminate/2,
+ handle_call/3, handle_cast/2, terminate/2,
start/1]).
-include_lib("wx/include/wx.hrl").
@@ -118,6 +118,10 @@ handle_call(Msg, _From, State) ->
io:format("Got Call ~p~n",[Msg]),
{reply,ok,State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, not_yet_implemented, State}.
diff --git a/lib/wx/examples/demo/ex_graphicsContext.erl b/lib/wx/examples/demo/ex_graphicsContext.erl
index bcd7a75be0..c356500d99 100644
--- a/lib/wx/examples/demo/ex_graphicsContext.erl
+++ b/lib/wx/examples/demo/ex_graphicsContext.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -26,7 +26,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
handle_info/2, handle_call/3,
- handle_event/2, handle_sync_event/3]).
+handle_cast/2, handle_event/2, handle_sync_event/3]).
-include_lib("wx/include/wx.hrl").
@@ -98,6 +98,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_grid.erl b/lib/wx/examples/demo/ex_grid.erl
index 2169c818ff..d1a9952ab2 100644
--- a/lib/wx/examples/demo/ex_grid.erl
+++ b/lib/wx/examples/demo/ex_grid.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -81,6 +81,10 @@ handle_info(_Msg, State) ->
handle_call(_Msg, _From, State) ->
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_htmlWindow.erl b/lib/wx/examples/demo/ex_htmlWindow.erl
index b864cd10b2..564c790e48 100644
--- a/lib/wx/examples/demo/ex_htmlWindow.erl
+++ b/lib/wx/examples/demo/ex_htmlWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include("../../include/wx.hrl").
@@ -81,6 +81,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_listCtrl.erl b/lib/wx/examples/demo/ex_listCtrl.erl
index 3faec4e229..13096dfa52 100644
--- a/lib/wx/examples/demo/ex_listCtrl.erl
+++ b/lib/wx/examples/demo/ex_listCtrl.erl
@@ -23,7 +23,7 @@
-behaviour(wx_object).
-export([start/1, init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-record(state,
{
@@ -147,6 +147,11 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config,"Got Call ~p\n",[Msg]),
{reply,ok,State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_notebook.erl b/lib/wx/examples/demo/ex_notebook.erl
index 2e16ccfffa..fc38fdae08 100644
--- a/lib/wx/examples/demo/ex_notebook.erl
+++ b/lib/wx/examples/demo/ex_notebook.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -23,7 +23,7 @@
-behaviour(wx_object).
-export([start/1, init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-record(state,
{
@@ -133,6 +133,11 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config,"Got Call ~p\n",[Msg]),
{reply,ok,State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_pickers.erl b/lib/wx/examples/demo/ex_pickers.erl
index 892c5b449d..8013a5ba32 100644
--- a/lib/wx/examples/demo/ex_pickers.erl
+++ b/lib/wx/examples/demo/ex_pickers.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -124,6 +124,11 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_popupMenu.erl b/lib/wx/examples/demo/ex_popupMenu.erl
index 8774dbef7b..d6778c5dc5 100644
--- a/lib/wx/examples/demo/ex_popupMenu.erl
+++ b/lib/wx/examples/demo/ex_popupMenu.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -90,6 +90,11 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_radioBox.erl b/lib/wx/examples/demo/ex_radioBox.erl
index 8211aec4a2..ab7685f41f 100644
--- a/lib/wx/examples/demo/ex_radioBox.erl
+++ b/lib/wx/examples/demo/ex_radioBox.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,7 +21,7 @@
-behaviour(wx_object).
-export([start/1, init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -107,6 +107,9 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config,"Got Call ~p\n",[Msg]),
{reply, {error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_sashWindow.erl b/lib/wx/examples/demo/ex_sashWindow.erl
index dd05f4e45f..d8a8958f28 100644
--- a/lib/wx/examples/demo/ex_sashWindow.erl
+++ b/lib/wx/examples/demo/ex_sashWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -116,6 +116,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_sizers.erl b/lib/wx/examples/demo/ex_sizers.erl
index 2cc6efd503..7b9e8eb37f 100644
--- a/lib/wx/examples/demo/ex_sizers.erl
+++ b/lib/wx/examples/demo/ex_sizers.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -101,6 +101,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_slider.erl b/lib/wx/examples/demo/ex_slider.erl
index 7b669d96f6..612543ff26 100644
--- a/lib/wx/examples/demo/ex_slider.erl
+++ b/lib/wx/examples/demo/ex_slider.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,7 +21,7 @@
-behaviour(wx_object).
-export([start/1, init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -101,6 +101,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config,"Got Call ~p\n",[Msg]),
{reply, {error, nyi},State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_splitterWindow.erl b/lib/wx/examples/demo/ex_splitterWindow.erl
index c135f298fa..4f25b73293 100644
--- a/lib/wx/examples/demo/ex_splitterWindow.erl
+++ b/lib/wx/examples/demo/ex_splitterWindow.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -90,6 +90,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_static.erl b/lib/wx/examples/demo/ex_static.erl
index 67061520c4..013bd5ac35 100644
--- a/lib/wx/examples/demo/ex_static.erl
+++ b/lib/wx/examples/demo/ex_static.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -105,6 +105,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_textCtrl.erl b/lib/wx/examples/demo/ex_textCtrl.erl
index 95837c7c4c..d82884f30b 100644
--- a/lib/wx/examples/demo/ex_textCtrl.erl
+++ b/lib/wx/examples/demo/ex_textCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,7 +21,7 @@
-behaviour(wx_object).
-export([start/1, init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -92,6 +92,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config,"Got Call ~p\n",[Msg]),
{reply, {error,nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/demo/ex_treeCtrl.erl b/lib/wx/examples/demo/ex_treeCtrl.erl
index fa40795393..611904500a 100644
--- a/lib/wx/examples/demo/ex_treeCtrl.erl
+++ b/lib/wx/examples/demo/ex_treeCtrl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -25,7 +25,7 @@
%% wx_object callbacks
-export([init/1, terminate/2, code_change/3,
- handle_info/2, handle_call/3, handle_event/2]).
+ handle_info/2, handle_call/3, handle_cast/2, handle_event/2]).
-include_lib("wx/include/wx.hrl").
@@ -109,6 +109,10 @@ handle_call(Msg, _From, State) ->
demo:format(State#state.config, "Got Call ~p\n", [Msg]),
{reply,{error, nyi}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, ignore, State}.
diff --git a/lib/wx/examples/sudoku/sudoku_board.erl b/lib/wx/examples/sudoku/sudoku_board.erl
index 756837582f..4b26ff97da 100644
--- a/lib/wx/examples/sudoku/sudoku_board.erl
+++ b/lib/wx/examples/sudoku/sudoku_board.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -30,7 +30,7 @@
draw/3,
%% Callbacks
init/1, handle_sync_event/3,
- handle_event/2, handle_info/2, handle_call/3,
+ handle_event/2, handle_info/2, handle_call/3, handle_cast/2,
code_change/3, terminate/2]).
-include("sudoku.hrl").
@@ -209,6 +209,10 @@ handle_call({draw, DC, Size},_From, S) ->
redraw(DC,Size,S),
{reply, ok, S}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, not_yet_implemented, State}.
diff --git a/lib/wx/examples/sudoku/sudoku_gui.erl b/lib/wx/examples/sudoku/sudoku_gui.erl
index 4aaecfe086..3d0c95ffa7 100644
--- a/lib/wx/examples/sudoku/sudoku_gui.erl
+++ b/lib/wx/examples/sudoku/sudoku_gui.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,7 +24,7 @@
%%%-------------------------------------------------------------------
-module(sudoku_gui).
--export([init/1, handle_info/2, handle_call/3, handle_event/2,
+-export([init/1, handle_info/2, handle_call/3, handle_cast/2, handle_event/2,
terminate/2, code_change/3]).
-compile(export_all).
@@ -230,6 +230,10 @@ handle_event(Msg,S) ->
handle_call(What, _From, State) ->
{stop, {call, What}, State}.
+handle_cast(Msg, State) ->
+ io:format("Got cast ~p~n",[Msg]),
+ {noreply,State}.
+
code_change(_, _, State) ->
{stop, not_yet_implemented, State}.