Behavior undefined warning

Joel Reymont joelr1@REDACTED
Sat Apr 29 01:21:28 CEST 2006


On Apr 29, 2006, at 12:10 AM, Sean Hinde wrote:

> http://www.erlang.org/doc/doc-5.4.13/doc/design_principles/ 
> spec_proc.html#6.3

Something does not add up since I (Mickael actually) have the  
requisite functions exported but still get the warning.

-module(gen_xmpp_client).

-export([behaviour_info/1]).

-export([start/3, start_link/3]).

-include("xmpp.hrl").

%% defining expected callbacks in the behaviour code
behaviour_info(callbacks) ->
     [{init, 2},
      {presence, 5},
      {message, 7},
      {iq, 7}];
behaviour_info(_Other) ->
     undefined.

------

-module(xmpp_echo_behaviour).
-behaviour(gen_xmpp_client).

%% XMPP configuration attributes
-host("localhost").
%% -port(5222).
-username("echo").
-authentication({password,"echo"}).
-resource("Erlang echo behaviour").

%% Optional:
-include("xmpp.hrl").

%% Behaviour callbacks
-export([init/2,
	 presence/5,
	 message/7,
	 iq/7]).

-export([start/0]).

--
http://wagerlabs.com/








More information about the erlang-questions mailing list