About the changes of Emit for node 0.6<div><br></div><div>0.6 - We need a .js wrapper to extent the prototype of the objects which emit events</div><div>0.4 - The prototype of EventEmitter is inherited in C++ : <span style="font-family:'Bitstream Vera Sans Mono',Courier,monospace;font-size:12px;line-height:16px">t->Inherit(EventEmitter::constructor_template);</span></div>
<div>possible fix - we could just only include the C++ inherit on node 0.4 with a define and the js prototype only on node 0.6+</div><div><br></div><div>0.6 - C++ emitting objects are derived from ObjectWrap</div><div>0.4 - C++ emitting objects are derived from EventEmitter</div>
<div>possible fix - class XapWrapEe<T> : public ObjectWrap on node 0.6+ and XapWrapEe<T> : public EventEmitter on node 0.4</div><div><br></div><div>0.6 - C++ must get the "emit" function and then call it</div>
<div>0.4 - C++ just calls Emit</div><div>possible fix - make XapWrapEe have an emit method which will be different for the different node versions</div><div><br></div><div><br></div><div>Since we only have one emit in the existing binding, we decided to change that to a callback as events are not necessarily required, so these changes are not required yet.</div>
<div><br></div>