home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / smalltal / 2336 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1.5 KB  |  42 lines

  1. Newsgroups: comp.lang.smalltalk
  2. Path: sparky!uunet!mcsun!Germany.EU.net!ira.uka.de!rz.uni-karlsruhe.de!wiormac5.wiwi.uni-karlsruhe.de!geidel
  3. From: Joachim Geidel <geidel@wior360.wiwi.uni-karlsruhe.de>
  4. Subject: OW\ST R4.1 Patch for Pixmap class>>fromClipboardOn:
  5. Message-ID: <1992Nov20.164925.16351@rz.uni-karlsruhe.de>
  6. X-Xxmessage-Id: <A732D5BD10017B07@wiormac5.wiwi.uni-karlsruhe.de>
  7. X-Xxdate: Fri, 20 Nov 92 16: 49:49 GMT
  8. Sender: usenet@rz.uni-karlsruhe.de (USENET 'No news is bad news' News System)
  9. Organization: WIOR, Universitaet Karlsruhe (Germany)
  10. X-Useragent: Nuntius v1.1.1d11
  11. Date: Fri, 20 Nov 1992 16:49:25 GMT
  12. Lines: 28
  13.  
  14. "The code for getting a Pixmap from the clipboard in OW\ST R4.1 contains a
  15. call to Pixmap>>handle: which does not exist any more."
  16.  
  17. 'From Objectworks\Smalltalk(R), Release 4.1 of 15 April 1992 on 19
  18. November 1992 at 4:11:11 pm'!
  19.  
  20.  
  21.  
  22. !Pixmap class methodsFor: 'instance creation'!
  23.  
  24. fromClipboardOn: aScreen
  25.     "Answer a new Pixmap which is a copy of the
  26.     platform's graphics clipboard. If platform is unable
  27.     to comply with the request, answer an empty Pixmap."
  28.  
  29.     "ScheduledControllers activeController view graphicsContext display:
  30.     Pixmap fromClipboard at: 0@0."
  31.  
  32.     | handle pixmap result aPoint |
  33.     result := aScreen getPixmapFromClipboard.
  34.     handle := result at: 1.
  35.     aPoint := (result at: 2)@(result at: 3).
  36.     "Pixmaps don't understand #handle:.
  37.     Joachim Geidel, 92/11/19"
  38.     "pixmap := super new handle: handle."
  39.     pixmap := super new handleValue: [handle].
  40.     pixmap changeExtent: aPoint.
  41.     ^pixmap! !
  42.