2013/1/2 J. P. L. Martín <argu...@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.