home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.smalltalk
- Path: sparky!uunet!rayssd!galaxia!zoe!terry
- From: terry@zoe.network23.com (Terry)
- Subject: Re: A Question
- Message-ID: <1993Jan25.171126.25608@zoe.network23.com>
- Organization: Mystech Associates
- References: <ZINK.93Jan21091955@rorschach.inf-wiss.ivp.uni-konstanz.de>
- Date: Mon, 25 Jan 1993 17:11:26 GMT
- Lines: 30
-
- From article <ZINK.93Jan21091955@rorschach.inf-wiss.ivp.uni-konstanz.de>, by zink@inf-wiss.ivp.uni-konstanz.de (Volker Zink):
- >
- > Hello,
- >
- > i work with st80 4.0 . Recently i used Sets to store
- > some information. I got an error because i thought,
- > that when i "add:" an element to the set, the new
- > set would be returned, but the element was returned.
- > So i had to rewrite my code (it got longer), and wonder
- > if this behaviour is intended. What are you
- > thinking of it?
- >
- > Bye...
- > Volker
- >
- Yes, this is the indended behavior. You are not the first,
- nor will you be the last, who has been bitten by this
- behavior. This is the behavior for all collections, not
- just sets. If you want the set to be returned do the
- following
-
- aSet add: something; yourself.
-
- Cascading yourself after the add: message will return the
- collection.
-
- Terry
- --
- terry@zoe.network23.com
- {rayssd,xanth,mirror,att}!galaxia!zoe!terry
-