Jan. 2, 2013
2:28 p.m.
Done, I've just append asString on the collect: block. :D On Wed, Jan 2, 2013 at 11:18 AM, Esteban A. Maringolo <emaringolo@gmail.com>wrote:
2013/1/2 J. P. L. MartÃn <arguser@gmail.com>:
Another question, when I try this:
Prestamo database collect: [:x | x id,' ',x idMaterial]
I get Receiver of "," nil. How do I solve it?
You probably have one or more elements in the collection returned by "Prestamo database" whose id's are nil. Then you're sending #, to a nil element.
I would ensure all elements have an ID, or better than that I would delegate the printing responsibility to the element itself. It is: Prestamo database collect: [:x | x printIdAndMaterial]
This way the testing of a nil id is done by the receiver.
Regards,
Esteban.