[Pharo-dev] Spec new release :)

Stéphane Ducasse stephane.ducasse at inria.fr
Mon Nov 11 19:49:20 EST 2013


> 
> Example:
> aMenu addGroup: [ :aGroup |
> 	aGroup addItem: [ :anItem |
> 		anItem name: 'Browse Full';
> 		action: [ self browseSelectedObject ];
> 		shortcut: $b command mac | $b alt win | $b alt unix  ].
> 	aGroup addItem: [ :anItem |
> 		anItem name: 'Browse Class';
> 		action: [ self browseSelectedObjectClass ] ] ].
> 	

I do not see the value of passing block to add element to groups 
why not the normal way i.e. passing an object. I do not get why executing
 a block with an object is better?

Stef




More information about the Pharo-dev mailing list