Thanks Esteban, I have another question. Some of the elements of Prestamo are Date objects, how can i collec them from database since they are not indexable? *btw, I'm trying to show them on a list.
Thanks in advance! On Wed, Jan 2, 2013 at 11:18 AM, Esteban A. Maringolo <[email protected]>wrote: > 2013/1/2 J. P. L. Martín <[email protected]>: > > 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. > >
