Hmm... there's no "magic" for this.�
Some options:

Instead of instantiating your objects with new, try defining your own class method for getting a new instance.

Something like:

Dog class>>newWithParams: aDictionary
� �^self new params: aDictionary

Dog>>params: aDictionary
params := aDictionary

Is that something similar to what you were looking for?

Cheers,
Carla.

On Tue, Sep 11, 2012 at 3:36 PM, sergio_101 <sergio.rrd@gmail.com> wrote:
yes, i know this sounds simple.. but is it possible to instantiate an
object with some parameters?

say i have a dictionary:

params := Dictionary new.
params at: 'sound' put: 'bark'

dog := Dog new.

^^ at this point, i would like to just create a dog and send it
'params' all at once..

can i do this? what would the syntax look like?

thanks!


--
----
peace,
sergio
photographer, journalist, visionary

http://www.ThoseOptimizeGuys.com
http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101