if i have an ordered collection of say albums...
and the albums have a 'desc' instance variable..
and i decide i want to change 'desc' from 'this is a bad album' to 'this is a good album' on the 7th element in the list, how would i phrase that?
i am kicking around:
Album repository at: 7 desc: 'this is a good album'
but i don't think the evaluation order is correct..
any ideas?
thanks!
You just need to use parentheses, like so:
(Album repository at: 7) desc: 'this is a good album'
BTW, it is better to use full words for your method and variable names -- they are much easier to guess.
I don't know about the context where you want to use this, but maybe it is a good idea to separate it into two statements:
album := Album repository at: 7. album description: 'this is a good album'.
Cheers
Matthias
On Sat, Mar 6, 2010 at 3:40 PM, sergio_101 sergiolist@village-buzz.com wrote:
if i have an ordered collection of say albums...
and the albums have a 'desc' instance variable..
and i decide i want to change 'desc' from 'this is a bad album' to 'this is a good album' on the 7th element in the list, how would i phrase that?
i am kicking around:
Album repository at: 7 desc: 'this is a good album'
but i don't think the evaluation order is correct..
any ideas?
thanks!
--
peace, sergio photographer, journalist, visionary
http://www.coffee-black.com http://www.painlessfrugality.com http://www.twitter.com/sergio_101 http://www.facebook.com/sergio101 _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
BTW, it is better to use full words for your method and variable names -- they are much easier to guess.
yes.. i first used description, but i saw that it was overriding another method, so i thought i might play it safe..
I don't know about the context where you want to use this, but maybe it is a good idea to separate it into two statements:
album := Album repository at: 7. album description: 'this is a good album'.
that was what i initially thought.. but i wasn't sure it it was saving me anything by putting them together...
thanks!
beginners@lists.squeakfoundation.org