[Seaside-dev] Issue 268 in seaside: Introduce WAMessageSend
codesite-noreply at google.com
codesite-noreply at google.com
Sun Jan 4 00:17:45 UTC 2009
Comment #10 on issue 268 by jfitzell: Introduce WAMessageSend
http://code.google.com/p/seaside/issues/detail?id=268
[edited to correct silly implementation mistake I remembered while falling
asleep :) ]
That's getting pretty fancy - do we have a use case that actually needs it?
I can imagine an implementation a bit like ROE using exactly the block you
specify above:
s := WADelayedMessageSend send: [:x :y | y foo: a1 bar: a2 zork: x]
the instance creation method would check how many arguments the block had
and pass special objects in for
each one. Then it would evaluate the block and be able to tell which
argument was the receiver and (since the
method gets called on it, what the parameters were). It's less clear what
the implementation is if you want to
specify the receiver at creation time. I guess you have to add the receiver
as a parameter to the block:
s := WADelayedMessageSend
receiver: MyClass
send: [ :receiver :x :y | receiver foo: a1 bar: a2 zork: x]
It's a little wonky and given that it probably the more common use case,
that's a shame. But it would work.
So, I think that's quite cool actually but... do we need it?
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the seaside-dev
mailing list