In my experience the quickest way to find a bug is to post a question. Then when it's impossible to remove the question the solution will appear, leaving me to feel foolish.
On Sun, Feb 10, 2013 at 9:59 PM, rektide <[email protected]> wrote: > That was super fun! I'd neglected to call stream.Transform's constructor > when I derived from > it. Everything appears to be working fine now, I think. The nop branch > reflects this change. > > Thanks, & please pardon the interruption. > > O Mon, Feb 11, 2013 at 12:52:37AM -0500, rektide wrote: > > Hello hello lovely Node-js people- > > > > I'm trying to implement a very simple stream.Transform, but I appear to > be doing something > > wrong! Please help me figure out how to get going with stream.Transform! > > > > My utterly trivial sample code is at- > > https://github.com/rektide/arclamp2/blob/nop/src/ClarinetStream.js > > > > It's essentially- > > function clarinetStream(){return this} > > util.inherit(clarinetStream, stream.Transform) > > clarinetStream.prototype._transform= > function(chunk,outFn,callback){callback()} > > > > When I try to run my sample (which can be done via `npm test`), I get > this stack trace- > > _stream_writable.js:129 > > if (state.ended) { > > ^ > > TypeError: Cannot read property 'ended' of undefined > > at ClarinetStream.Writable.write (_stream_writable.js:129:12) > > at write (_stream_readable.js:481:24) > > at flow (_stream_readable.js:491:7) > > at ReadStream.pipeOnReadable (_stream_readable.js:523:5) > > at ReadStream.EventEmitter.emit (events.js:91:17) > > at emitReadable (_stream_readable.js:343:10) > > at onread (_stream_readable.js:288:7) > > at ReadableState.onread (_stream_readable.js:64:5) > > at onread (fs.js:1509:5) > > at Object.wrapper [as oncomplete] (fs.js:419:17) > > > > > > I had been attempting to use a 0.9.9-pre vintage build, and am now > locked & loaded with the > > latest trunk work. I've looked around some of Node's lib/_stream_* impl, > but thusfar I don't > > have a good registration on what's going on, what I could be doing wrong. > > > > Any help getting a sample stream.Transform running would be much > appreciated!! > > -rektide de la faye > > > > -- > > -- > > Job Board: http://jobs.nodejs.org/ > > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > > You received this message because you are subscribed to the Google > > Groups "nodejs" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > > http://groups.google.com/group/nodejs?hl=en?hl=en > > > > --- > > You received this message because you are subscribed to the Google > Groups "nodejs" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
