<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in '18.3 Alarm Management: incomplete gen_event' | Pragmatic Forums</title>
    <link>http://fora.pragprog.com/forums/27/topics/214</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>18.3 Alarm Management: incomplete gen_event posted by Alain O'Dea @ Sun, 13 Jan 2008 03:30:56 -0000</title>
      <description>&lt;p&gt;Compiling the code for my_alarm_handler.erl as is I get the following error:&lt;br /&gt;./my_alarm_handler.erl:2: Warning: undefined callback function code_change/3 (behaviour &amp;#8216;gen_event&amp;#8217;)&lt;/p&gt;


	&lt;p&gt;I resolved this by adding another clause to the export statement:&lt;br /&gt;Changing this:&lt;br /&gt;&lt;pre&gt;-export([init/1, handle_event/2, handle_call/2,
         handle_info/2,  terminate/2]).&lt;/pre&gt;&lt;br /&gt;Into this:&lt;br /&gt;&lt;pre&gt;-export([init/1, handle_event/2, handle_call/2,
         handle_info/2,  terminate/2, code_change/3]).&lt;/pre&gt;&lt;/p&gt;


	&lt;p&gt;And adding code_change/3:&lt;br /&gt;&lt;pre&gt;code_change(_OldVsn, State, _Extra) -&amp;gt; {ok, State}.&lt;/pre&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 13 Jan 2008 03:30:56 -0000</pubDate>
      <guid isPermaLink="false">fora.pragprog.com:27:214:2162</guid>
      <author>Alain O'Dea</author>
      <link>http://fora.pragprog.com/forums/27/topics/214</link>
    </item>
  </channel>
</rss>
