[Q]: Update: mechanism

Ned Konz ned at bike-nomad.com
Fri Nov 22 16:22:02 UTC 2002


On Friday 22 November 2002 04:13 am, Thierry Reignier wrote:
> Hi,
>
> Object>>update: aParameter allows to pass only one parameter,
> usually a symbol but what if I need to pass additional parameters.
> I was looking for a update:with: or update:withArguments: as in VW
> but could not find them.
>
> Is it supported another way? Is something that could be supported?

Ah, another VW type...

It's easy to support update:with: if you want; the problem is that 
other VW/Squeak packages like the RB and StarBrowser also might like 
to do this.

See the attached CS for a simple version of this.

You should also look into the new events mechanism; instead of 
addDependent: and then having a case switch on aspect type in your 
update: method, you register interest in a particular aspect:

self when: #somethingInteresting send: #somethingInterestingHappened: 
to: self with: argument

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: updateWith-nk.1.cs
Type: text/x-squeak-changeset
Size: 762 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20021122/c3cba6ce/updateWith-nk.1.bin


More information about the Squeak-dev mailing list