home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / smalltal / 2817 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.2 KB  |  41 lines

  1. Newsgroups: comp.lang.smalltalk
  2. Path: sparky!uunet!rayssd!galaxia!zoe!terry
  3. From: terry@zoe.network23.com (Terry)
  4. Subject: Re: A Question
  5. Message-ID: <1993Jan25.171126.25608@zoe.network23.com>
  6. Organization: Mystech Associates
  7. References: <ZINK.93Jan21091955@rorschach.inf-wiss.ivp.uni-konstanz.de>
  8. Date: Mon, 25 Jan 1993 17:11:26 GMT
  9. Lines: 30
  10.  
  11. From article <ZINK.93Jan21091955@rorschach.inf-wiss.ivp.uni-konstanz.de>, by zink@inf-wiss.ivp.uni-konstanz.de (Volker Zink):
  12. >     Hello,
  13. > i work with st80 4.0 . Recently i used Sets to store
  14. > some information. I got an error because i thought,
  15. > that when i "add:" an element to the set, the new
  16. > set would be returned, but the element was returned.
  17. > So i had to rewrite my code (it got longer), and wonder
  18. > if this behaviour is intended. What are you
  19. > thinking of it?
  20. > Bye...
  21. >     Volker
  22. Yes, this is the indended behavior.  You are not the first,
  23. nor will you be the last, who has been bitten by this
  24. behavior.  This is the behavior for all collections, not
  25. just sets.  If you want the set to be returned do the 
  26. following
  27.  
  28. aSet add: something; yourself.
  29.  
  30. Cascading yourself after the add: message will return the
  31. collection.
  32.  
  33. Terry
  34. -- 
  35. terry@zoe.network23.com
  36. {rayssd,xanth,mirror,att}!galaxia!zoe!terry
  37.