[Pharo-project] generalizing NeoCSV
Hi Sven, I am looking at NeoCSV, and I would like to add it to Moose by default. During the review, I noticed that it relies on perform: addRawField: accessor "Add a field based on an accessor to be written as a #raw field" self addFieldAccessor: [ :object | self writeRawField: (object perform: accessor) ] I would prefer to have it modified to simply use value:. In this way we can pass blocks as transformation specifications. Why is this important? Because we often have values that we want to export but that do not have a direct correspondent in a unary method. Would it be Ok to make this modification? Cheers, Doru -- www.tudorgirba.com "Every thing has its own flow"
Hi Doru, On 08 May 2013, at 15:25, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi Sven,
I am looking at NeoCSV, and I would like to add it to Moose by default.
That is great to hear, thanks !
During the review, I noticed that it relies on perform:
addRawField: accessor "Add a field based on an accessor to be written as a #raw field"
self addFieldAccessor: [ :object | self writeRawField: (object perform: accessor) ]
I would prefer to have it modified to simply use value:. In this way we can pass blocks as transformation specifications.
Why is this important? Because we often have values that we want to export but that do not have a direct correspondent in a unary method.
Would it be Ok to make this modification?
That is an excellent suggestion, thanks. I made the change to both the writer and the reader (sadly #value:#value: does not exist on Symbol). --- Name: ConfigurationOfNeoCSV-SvenVanCaekenberghe.10 Author: SvenVanCaekenberghe Time: 13 May 2013, 1:19:12.655 pm UUID: 98714491-3388-4a52-8720-43c8b27079d1 Ancestors: ConfigurationOfNeoCSV-SvenVanCaekenberghe.9 v8 Added support for blocks as accessors to the writer and the reader as suggested by Tudor Girba (Thx). Added writer features #addEmptyField and #addConstantField: --- Regards, Sven PS: I am sure you need JSON support as well, please also consider NeoJSON as well ;-)
Cheers, Doru
-- www.tudorgirba.com
"Every thing has its own flow"
-- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org
participants (2)
-
Sven Van Caekenberghe -
Tudor Girba