[erlang-questions] gen_event help

Vlad Dumitrescu vladdu55@REDACTED
Thu Jan 27 19:23:48 CET 2011


Hi,

On Thu, Jan 27, 2011 at 19:08, Alexander Kuleshov <kuleshovmail@REDACTED>wrote:

> handle_event(_Event, State) ->
>    {ok, State};
> handle_event({test}, State) ->
>    io:format("Test"),
>    {ok, State}.
>
>
The first clause matches and is executed. Try this instead:

handle_event({test}, State) ->
   io:format("Test"),
   {ok, State};
handle_event(_Event, State) ->
   {ok, State}.

regards,
Vlad


More information about the erlang-questions mailing list