From ea5c1adc0031f7c132f833b9342a6ed6664e796c Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Tue, 23 Aug 2022 14:36:28 +0200 Subject: [PATCH] Fix displaying screenshot of Pharo --- .../Form.extension/instance/seasideMimeDocumentType..st | 8 ++++---- .../WAScreenshot.class/instance/form.st | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repository/Seaside-Pharo-Core.package/Form.extension/instance/seasideMimeDocumentType..st b/repository/Seaside-Pharo-Core.package/Form.extension/instance/seasideMimeDocumentType..st index ee0d73c24..faa261669 100644 --- a/repository/Seaside-Pharo-Core.package/Form.extension/instance/seasideMimeDocumentType..st +++ b/repository/Seaside-Pharo-Core.package/Form.extension/instance/seasideMimeDocumentType..st @@ -2,9 +2,9 @@ seasideMimeDocumentType: aMimeType "Converts the receiver to a WAMimeDocument. The argument should ideally be an instance for WAMimeType. For various crappy reasons Strings and nil are also allowed." - | aStream writer | - aStream := GRPlatform current readWriteByteStream. + | writer content | writer := self writerForMimeType: aMimeType seasideMimeType. writer isNil ifTrue: [ self error: 'no writer for ', aMimeType greaseString, ' found' ]. - writer putForm: (self asFormOfDepth: 32) onStream: aStream. - ^ WAMimeDocument on: aStream contents mimeType: aMimeType \ No newline at end of file + content := ByteArray streamContents: [ :stream | + writer putForm: (self asFormOfDepth: 32) onStream: stream ]. + ^ WAMimeDocument on: content mimeType: aMimeType \ No newline at end of file diff --git a/repository/Seaside-Pharo-Tools-Web.package/WAScreenshot.class/instance/form.st b/repository/Seaside-Pharo-Tools-Web.package/WAScreenshot.class/instance/form.st index fbccfba49..04cae99cd 100644 --- a/repository/Seaside-Pharo-Tools-Web.package/WAScreenshot.class/instance/form.st +++ b/repository/Seaside-Pharo-Tools-Web.package/WAScreenshot.class/instance/form.st @@ -1,5 +1,5 @@ accessing form ^ zoom - ifFalse: [ Display copy ] + ifFalse: [ UIManager default world imageForm ] ifTrue: [ self topWindow imageForm ] \ No newline at end of file