These are chat archives for mojotech/pioneer

4th
Aug 2014
Josh
@joshtombs
Aug 04 2014 14:14
@samccone you left a comment requesting an example with a transformer for the readAT, and i guess im not 100% sure what a transformer would do for a read function
Sam Saccone
@samccone
Aug 04 2014 14:14
this.readAt(“3”, function(val){return $.trim(va)})
but it is tricky
since that second param is polymorphic
so really it can be
Josh
@joshtombs
Aug 04 2014 14:15
okay, so we also need to handle the case that the second parameter is a function and not a selector
Sam Saccone
@samccone
Aug 04 2014 14:16
this.readAt(3, function(val){return $.trim(va)})
this.readAt(3, ‘p’, function(val){return $.trim(va)})
this.readAt(3)
this.readAt(3, ‘p')
Josh
@joshtombs
Aug 04 2014 14:16
readAt(index, <selector>)
Sam Saccone
@samccone
Aug 04 2014 14:16
readAt(index, <selector>, <transformer>)
readAt(index, <transformer>)
are the two sigs
Josh
@joshtombs
Aug 04 2014 14:17
right so you need to check the type of the second variable?
Sam Saccone
@samccone
Aug 04 2014 14:17
you got it
Josh
@joshtombs
Aug 04 2014 14:17
okay, and va
Sam Saccone
@samccone
Aug 04 2014 14:17
this is weird
mojotech/pioneer#133
Josh
@joshtombs
Aug 04 2014 14:17
is that just some arbitrary variable
Sam Saccone
@samccone
Aug 04 2014 14:17
why it failed