[erlang-questions] gen_event help

Tomasz Maciejewski <>
Thu Jan 27 19:20:48 CET 2011


Dnia 27-01-2011 o 19:08:50 Alexander Kuleshov <> napisał(a):

> handle_event(_Event, State) ->
>     {ok, State};
> handle_event({test}, State) ->
>     io:format("Test"),
>     {ok, State}.
>
> (...)
>
> When i try notify i expect that function handle_event({test}, State)
> execute but nothing occurs. Why? What's wrong?

You catch every event by the first function clause, so the io:format/1 will never be called.

-- 
Tomasz Maciejewski


More information about the erlang-questions mailing list