custom behaviour

stewart setori88@REDACTED
Tue Feb 16 16:00:12 CET 2010


Dear all

I would like to create a custom erlang behaviour

------------------ gen_gist.erl ---------------
-module(gen_gist).

-export([behaviour_info/1]).

behaviour_info(callbacks) ->
    [{foo,0}];
behaviour_info(_Other) ->
    undefined.

-----------------end gen_gist.erl -------------

----------------- rtree.erl -------------------
-module(rtree).
-behaviour(gen_gist).

-export([foo/0]).

foo() ->
    ok.
---------------- end rtree.erl ---------------
now when i run (rebar) i get :
"src/rtree.erl:2: Warning: behaviour gen_gist undefined"

I have tried doing "erlc rtree.erl -pa ." but still to no avail.

Please help.

Kind regards
Stewart


More information about the erlang-questions mailing list