[Newbies] Perform

Mathieu Suen mathk.sue at gmail.com
Mon Jan 14 14:18:04 UTC 2008

Hi Jakub,

#perform: is for unary message

If you want to pass arguments you have to use
#perform:with:    "On argument"
#perform:with:with: "Two arguments"
#perform:withArguments:  "Several arguments inside an Array"

so in your case it should be:

phonebook perform: #phone1 with: aValue


On Jan 14, 2008, at 2:58 PM, Jakub wrote:

> hello i have class with two setters
> phone1: aValue
> phone2: aValue
> and i want call it dynamically
> aSelector is phone1 or phone2 string
> setPhohne: aSelector by: aValue
> phoneBook perform aSelector, ':' aValue
> but this is not working how can i do this when i try this iwth  
> getters it works fine
> Transcript show: (phoneBook perform aSelector); cr.
> -- 
> Jakub. _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners


More information about the Beginners mailing list