Hi,
On 3 Jan 2012, at 14:32, Alexandre Bergel wrote:
We recently discussed about Glamour.
Who is we?
The example below illustrates well the
"magic" effect that some of us (including my students) do not really adhere with
DSL:
Something like this:
a list
allowItemDrag: [:item :list | ... ];
itemDrag: [:item :list | ... ]
a list
allowDropOnItem: [:draggedObject :targetItem :list | ... ];
dropOnItem: [:draggedObject :targetItem :list | ... ]
It is often not clear what the object referenced by "a" is. Even for me.
Why do you say often? You seem to imply that it can take many forms :). But, "a"
is always used in examples to denote an instance of GLMCompositePresentation. Always.
This convention is used to work in:
browser transmit from: ... ; to: ... ; andShow: [:a |
a ... ]
Another name used is "composer" or "presenter".
When I write scripts in Mondrian, I usually avoid
having "each".
view nodes: Collection withAllSubclasses forEach: [ :aClass | ... ].
Instead of
view nodes: Collection withAllSubclasses forEach: [ :each | ... ].
The two things are not the same. "a" is the correspondent of "view",
which is as obscure if you do not know that it is the holder of the api.
Anyway, what is your point? :)
Cheers,
Doru
--
www.tudorgirba.com
"It's not how it is, it is how we see it."