Seaside icon indicating copy to clipboard operation
Seaside copied to clipboard

Got ZnCharacterWriteStream did not understand #greaseNext:putAll:startingAt: while storing a Canvas on a file

Open vitormcruz opened this issue 1 year ago • 2 comments

Pharo 11, Windows, using Seaside 3.5.9

While trying to build a WAHtmlCanvas and storing it in a file, I got a "Instance of ZnCharacterWriteStream did not understand #greaseNext:putAll:startingAt:".

The code used to generate the file is:

	aFile writeStreamDo: [ :aFileStream |
		WAHtmlCanvas builder 
			documentClass: WAHtmlDocument ;
			rootClass: WAHtmlRoot;
			fullDocument: true;
			rootBlock: [ :root | root style: self style ];
			render: self on: aFileStream.		
	]

The error stacktrace is:

WAPharoXmlEncoder(WAPharoEncoder)>>nextPutAllFast:
WAPharoXmlEncoder(WAPharoEncoder)>>nextPutAll:
ByteString(String)>>encodeOn:
WAHtmlDocument(WAXmlDocument)>>print:
WAHtmlCanvas(WARenderer)>>text:
WAHtmlCanvas(WACanvas)>>text:
ByteString(String)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
[
		self before.
		canvas render: anObject.
		self after ] in WAGenericTag(WATagBrush)>>with: in Block: [...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
WAHtmlCanvas(WACanvas)>>nest:
WAGenericTag(WABrush)>>with:
WAGenericTag(WATagBrush)>>with:
WAHtmlCanvas>>preformatted:
[ html preformatted: self preformatedMessageText ] in [
         html div
            class: 'scenario-text-body';
            with: [ super body: html ].

         html div
            class: self messageCssBody;
            with: [ html preformatted: self preformatedMessageText ] 
		] in TomeScenarioErrorViewFragment(TomeScenarioWithMessageViewFragment)>>body: in Block: [ html preformatted: self preformatedMessageText ]
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
[
		self before.
		canvas render: anObject.
		self after ] in WAGenericTag(WATagBrush)>>with: in Block: [...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
WAHtmlCanvas(WACanvas)>>nest:
WAGenericTag(WABrush)>>with:
WAGenericTag(WATagBrush)>>with:
[
         html div
            class: 'scenario-text-body';
            with: [ super body: html ].

         html div
            class: self messageCssBody;
            with: [ html preformatted: self preformatedMessageText ] 
		] in TomeScenarioErrorViewFragment(TomeScenarioWithMessageViewFragment)>>body: in Block: [...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
[
		self before.
		canvas render: anObject.
		self after ] in WAGenericTag(WATagBrush)>>with: in Block: [...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
WAHtmlCanvas(WACanvas)>>nest:
WAGenericTag(WABrush)>>with:
WAGenericTag(WATagBrush)>>with:
TomeScenarioErrorViewFragment(TomeScenarioWithMessageViewFragment)>>body:
[ self body: html ] in TomeScenarioErrorViewFragment(TomeScenarioViewFragment)>>renderOn: in Block: [ self body: html ]
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
[
		self before.
		canvas render: anObject.
		self after ] in WAGenericTag(WATagBrush)>>with: in Block: [...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
WAHtmlCanvas(WACanvas)>>nest:
WAGenericTag(WABrush)>>with:
WAGenericTag(WATagBrush)>>with:
TomeScenarioErrorViewFragment(TomeScenarioViewFragment)>>renderOn:
[ :scenario | scenario renderOn: html ] in [ scenarios do: [ :scenario | scenario renderOn: html ] ] in [ 
			html div class: 'scenarios-', classTypePrefix.
			html div
				class: 'scenarios-body-', classTypePrefix;
			 	with: [ scenarios do: [ :scenario | scenario renderOn: html ] ]
		] in TomeFeatureView>>renderScenarios:on:usingClassTypePrefix: in Block: [ :scenario | scenario renderOn: html ]
OrderedCollection>>do:
[ scenarios do: [ :scenario | scenario renderOn: html ] ] in [ 
			html div class: 'scenarios-', classTypePrefix.
			html div
				class: 'scenarios-body-', classTypePrefix;
			 	with: [ scenarios do: [ :scenario | scenario renderOn: html ] ]
		] in TomeFeatureView>>renderScenarios:on:usingClassTypePrefix: in Block: [ scenarios do: [ :scenario | scenario renderO[..]
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
[
		self before.
		canvas render: anObject.
		self after ] in WAGenericTag(WATagBrush)>>with: in Block: [...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
WAHtmlCanvas(WACanvas)>>nest:
WAGenericTag(WABrush)>>with:
WAGenericTag(WATagBrush)>>with:
[ 
			html div class: 'scenarios-', classTypePrefix.
			html div
				class: 'scenarios-body-', classTypePrefix;
			 	with: [ scenarios do: [ :scenario | scenario renderOn: html ] ]
		] in TomeFeatureView>>renderScenarios:on:usingClassTypePrefix: in Block: [ ...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
[
		self before.
		canvas render: anObject.
		self after ] in WAGenericTag(WATagBrush)>>with: in Block: [...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
WAHtmlCanvas(WACanvas)>>nest:
WAGenericTag(WABrush)>>with:
WAGenericTag(WATagBrush)>>with:
TomeFeatureView>>renderScenarios:on:usingClassTypePrefix:
TomeFeatureView>>renderErrorScenarios:on:
[
		self renderFailedScenarios: (testResult failures collect: [ :test | test scenarioToRun asScenarioHtml]) on: html.
		html div class: 'scenario-section-splitter'.
		
		self renderErrorScenarios: (testResult errors collect: [ :test | test scenarioToRun asScenarioHtml]) on: html.
		html div class: 'scenario-section-splitter'.
		
		self renderPassedScenarios: (testResult passed collect: [ :test | test scenarioToRun asScenarioHtml]) on: html.
	] in TomeFeatureView>>renderContentOn: in Block: [...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
[
		self before.
		canvas render: anObject.
		self after ] in WAGenericTag(WATagBrush)>>with: in Block: [...
FullBlockClosure(BlockClosure)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
WAHtmlCanvas(WACanvas)>>nest:
WAGenericTag(WABrush)>>with:
WAGenericTag(WATagBrush)>>with:
TomeFeatureView>>renderContentOn:
WARenderVisitor>>visitPainter:
WARenderVisitor(WAPainterVisitor)>>visitPresenter:
WARenderVisitor(WAPainterVisitor)>>visitComponent:
TomeFeatureView(WAComponent)>>accept:
WARenderVisitor(WAVisitor)>>visit:
WARenderingGuide(WAPresenterGuide)>>visitPainter:
WARenderingGuide(WAPainterVisitor)>>visitPresenter:
WARenderingGuide(WAPainterVisitor)>>visitComponent:
TomeFeatureView(WAComponent)>>accept:
WARenderingGuide(WAPainterVisitor)>>visitDecorationsOfComponent:
TomeFeatureView(WAComponent)>>acceptDecorated:
WARenderingGuide(WAPresenterGuide)>>visit:
TomeFeatureView(WAPainter)>>renderWithContext:
TomeFeatureView(WAPainter)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
WABuilder>>render:on:
[ :aFileStream |
		WAHtmlCanvas builder 
			documentClass: WAHtmlDocument ;
			rootClass: WAHtmlRoot;
			fullDocument: true;
			rootBlock: [ :root | root style: self style ];
			render: self on: aFileStream.		
	] in TomeFeatureView>>generateSimplePageOnStream: in Block: [ :aFileStream |...
[ aBlock value: stream ] in FileReference(AbstractFileReference)>>writeStreamDo: in Block: [ aBlock value: stream ]
FullBlockClosure(BlockClosure)>>ensure:
FileReference(AbstractFileReference)>>writeStreamDo:
TomeFeatureView>>generateSimplePageOnStream:
[ :featureClass |
			TomeFeatureView new
				testResult: aTestResult;
				selectedFeatureClass: featureClass;
				generateSimplePageOnStream: (self reportingFileFor: featureClass)
		] in TomeHTMLReportingChain>>handle: in Block: [ :featureClass |...
OrderedCollection>>do:
TomeHTMLReportingChain>>handle:
TomeHTMLReportingChain(TomeScenarioReportingChain)>>templateHandle:
TomeScenarioReportingChain>>handleNext:
TomeScenarioReportingChain>>templateHandle:
TomeScenarioReportingChain>>startChainFor:
[ reportingChainObject startChainFor: aResult ] in TomeFeatureSuite>>runUnmanaged: in Block: [ reportingChainObject startChainFor: aResult ]
FullBlockClosure(BlockClosure)>>ensure:
TomeFeatureSuite>>runUnmanaged:
[
		self runUnmanaged: aResult ] in TomeFeatureSuite(TestSuite)>>run: in Block: [...
[ self value: anExecutionEnvironment.
	anExecutionEnvironment activated.
	aBlock value  ] in CurrentExecutionEnvironment class>>activate:for: in Block: [ self value: anExecutionEnvironment....
FullBlockClosure(BlockClosure)>>ensure:
CurrentExecutionEnvironment class>>activate:for:
TestExecutionEnvironment(ExecutionEnvironment)>>beActiveDuring:
DefaultExecutionEnvironment>>runTestsBy:
CurrentExecutionEnvironment class>>runTestsBy:
TomeFeatureSuite(TestSuite)>>run:
TomeFeatureSuite(TestSuite)>>run
TomeFeatureView>>renderContentOn:
WARenderVisitor>>visitPainter:
WARenderVisitor(WAPainterVisitor)>>visitPresenter:
WARenderVisitor(WAPainterVisitor)>>visitComponent:
TomeFeatureView(WAComponent)>>accept:
WARenderVisitor(WAVisitor)>>visit:
WARenderingGuide(WAPresenterGuide)>>visitPainter:
WARenderingGuide(WAPainterVisitor)>>visitPresenter:
WARenderingGuide(WAPainterVisitor)>>visitComponent:
TomeFeatureView(WAComponent)>>accept:
WARenderingGuide(WAPainterVisitor)>>visitDecorationsOfComponent:
TomeFeatureView(WAComponent)>>acceptDecorated:
WARenderingGuide(WAPresenterGuide)>>visit:
TomeFeatureView(WAPainter)>>renderWithContext:
TomeFeatureView(WAPainter)>>renderOn:
WAHtmlCanvas(WARenderer)>>render:
WAHtmlCanvas(WACanvas)>>render:
TomeReportingWebApp>>renderContentOn:
WARenderVisitor>>visitPainter:
WARenderVisitor(WAPainterVisitor)>>visitPresenter:
WARenderVisitor(WAPainterVisitor)>>visitComponent:
TomeReportingWebApp(WAComponent)>>accept:
WARenderVisitor(WAVisitor)>>visit:
WARenderingGuide(WAPresenterGuide)>>visitPainter:
WARenderingGuide(WAPainterVisitor)>>visitPresenter:
WARenderingGuide(WAPainterVisitor)>>visitComponent:
TomeReportingWebApp(WAComponent)>>accept:
TomeReportingWebApp(WAPresenter)>>renderUndecoratedWithContext:
WAToolDecoration(WADecoration)>>renderNextOn:
WAToolDecoration>>renderChildOn:
WAToolDecoration>>renderContentOn:
WARenderVisitor>>visitPainter:
WARenderVisitor(WAPainterVisitor)>>visitPresenter:
WARenderVisitor(WAPainterVisitor)>>visitDecoration:
WAToolDecoration(WADecoration)>>accept:
WARenderVisitor(WAVisitor)>>visit:
WARenderingGuide(WAPresenterGuide)>>visitPainter:
WARenderingGuide(WAPainterVisitor)>>visitPresenter:
WARenderingGuide(WAPainterVisitor)>>visitDecoration:
WAToolDecoration(WADecoration)>>accept:
WARenderingGuide(WAPainterVisitor)>>visitDecorationsOfComponent:
TomeReportingWebApp(WAComponent)>>acceptDecorated:
WARenderingGuide(WAPresenterGuide)>>visit:
TomeReportingWebApp(WAPainter)>>renderWithContext:
WARenderPhaseContinuation>>processRendering:
[ :response | self processRendering: response ] in WARenderPhaseContinuation>>handleFiltered: in Block: [ :response | self processRendering: response ]
WARequestContext>>respond:
WARenderPhaseContinuation(WASessionContinuation)>>respond:
WARenderPhaseContinuation>>handleFiltered:
[ self filter handleFiltered: aRequestContext ] in WARenderPhaseContinuation(WARequestHandler)>>handle: in Block: [ self filter handleFiltered: aRequestContext ]
[ activeProcess
			psValueAt: index
			put: anObject.
		aBlock value ] in WACurrentRequestContext(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
WACurrentRequestContext(DynamicVariable)>>value:during:
WACurrentRequestContext class(DynamicVariable class)>>value:during:
WACurrentRequestContext class(GRDynamicVariable class)>>use:during:
[ WACurrentRequestContext use: self during: aBlock ] in WARequestContext>>push:during: in Block: [ WACurrentRequestContext use: self during: aB[..]
FullBlockClosure(BlockClosure)>>ensure:
WARequestContext>>push:during:
WARenderPhaseContinuation(WARequestHandler)>>handle:
[ super handle: aRequestContext ] in WARenderPhaseContinuation(WASessionContinuation)>>handle: in Block: [ super handle: aRequestContext ]
FullBlockClosure(BlockClosure)>>on:do:
WARenderPhaseContinuation(WASessionContinuation)>>withUnregisteredHandlerDo:
WARenderPhaseContinuation(WASessionContinuation)>>handle:
WASession>>handleFiltered:
WATimingToolFilter(WARequestFilter)>>handleFiltered:
[ super handleFiltered: aRequestContext ] in WATimingToolFilter>>handleFiltered: in Block: [ super handleFiltered: aRequestContext ]
FullBlockClosure(BlockClosure)>>ensure:
WATimingToolFilter>>handleFiltered:
WADeprecatedToolFilter(WARequestFilter)>>handleFiltered:
[ super handleFiltered: aRequestContext ] in WADeprecatedToolFilter>>handleFiltered: in Block: [ super handleFiltered: aRequestContext ]
FullBlockClosure(BlockClosure)>>on:do:
WADeprecatedToolFilter>>handleFiltered:
WAMutualExclusionFilter(WARequestFilter)>>handleFiltered:
[ super handleFiltered: aRequestContext ] in WAMutualExclusionFilter>>handleFiltered: in Block: [ super handleFiltered: aRequestContext ]
FullBlockClosure(BlockClosure)>>ensure:
[
				self owner: process.
				aBlock ensure: [ self owner: nil ] ] in WAMutex>>critical: in Block: [...
[
		caught := true.
		self wait.
		blockValue := mutuallyExcludedBlock value
	] in Semaphore>>critical: in Block: [...
FullBlockClosure(BlockClosure)>>ensure:
Semaphore>>critical:
WAMutex>>critical:
WAMutualExclusionFilter>>handleFiltered:
[ self filter handleFiltered: aRequestContext ] in WASession(WARequestHandler)>>handle: in Block: [ self filter handleFiltered: aRequestContext ]
[ activeProcess
			psValueAt: index
			put: anObject.
		aBlock value ] in WACurrentRequestContext(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
WACurrentRequestContext(DynamicVariable)>>value:during:
WACurrentRequestContext class(DynamicVariable class)>>value:during:
WACurrentRequestContext class(GRDynamicVariable class)>>use:during:
[ WACurrentRequestContext use: self during: aBlock ] in WARequestContext>>push:during: in Block: [ WACurrentRequestContext use: self during: aB[..]
FullBlockClosure(BlockClosure)>>ensure:
WARequestContext>>push:during:
WASession(WARequestHandler)>>handle:
WAApplication(WARegistry)>>dispatch:to:key:
WAApplication(WARegistry)>>handleKeyed:with:context:
WAApplication(WARegistry)>>handleFiltered:
WAApplication>>handleFiltered:
WAExceptionFilter(WARequestFilter)>>handleFiltered:
[ super handleFiltered: aRequestContext ] in [
		WACurrentExceptionHandler
			use: handler
			during: [ super handleFiltered: aRequestContext ] ] in WAExceptionFilter>>handleFiltered: in Block: [ super handleFiltered: aRequestContext ]
[ activeProcess
			psValueAt: index
			put: anObject.
		aBlock value ] in WACurrentExceptionHandler(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
WACurrentExceptionHandler(DynamicVariable)>>value:during:
WACurrentExceptionHandler class(DynamicVariable class)>>value:during:
WACurrentExceptionHandler class(GRDynamicVariable class)>>use:during:
[
		WACurrentExceptionHandler
			use: handler
			during: [ super handleFiltered: aRequestContext ] ] in WAExceptionFilter>>handleFiltered: in Block: [...
FullBlockClosure(BlockClosure)>>on:do:
WAWalkbackErrorHandler(WAExceptionHandler)>>handleExceptionsDuring:
WAExceptionFilter>>handleFiltered:
[ self filter handleFiltered: aRequestContext ] in WAApplication(WARequestHandler)>>handle: in Block: [ self filter handleFiltered: aRequestContext ]
[ activeProcess
			psValueAt: index
			put: anObject.
		aBlock value ] in WACurrentRequestContext(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
WACurrentRequestContext(DynamicVariable)>>value:during:
WACurrentRequestContext class(DynamicVariable class)>>value:during:
WACurrentRequestContext class(GRDynamicVariable class)>>use:during:
[ WACurrentRequestContext use: self during: aBlock ] in WARequestContext>>push:during: in Block: [ WACurrentRequestContext use: self during: aB[..]
FullBlockClosure(BlockClosure)>>ensure:
WARequestContext>>push:during:
WAApplication(WARequestHandler)>>handle:
WADispatcher>>handleFiltered:named:
WADispatcher>>handleFiltered:
[ self filter handleFiltered: aRequestContext ] in WADispatcher(WARequestHandler)>>handle: in Block: [ self filter handleFiltered: aRequestContext ]
[ activeProcess
			psValueAt: index
			put: anObject.
		aBlock value ] in WACurrentRequestContext(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
WACurrentRequestContext(DynamicVariable)>>value:during:
WACurrentRequestContext class(DynamicVariable class)>>value:during:
WACurrentRequestContext class(GRDynamicVariable class)>>use:during:
[ WACurrentRequestContext use: self during: aBlock ] in WARequestContext>>push:during: in Block: [ WACurrentRequestContext use: self during: aB[..]
FullBlockClosure(BlockClosure)>>ensure:
WARequestContext>>push:during:
WADispatcher(WARequestHandler)>>handle:
[ self requestHandler handle: aRequestContext ] in ZnZincServerAdaptor(WAServerAdaptor)>>handleRequest: in Block: [ self requestHandler handle: aRequestContext ]
FullBlockClosure(BlockClosure)>>on:do:
ZnZincServerAdaptor(WAServerAdaptor)>>handleRequest:
ZnZincServerAdaptor(WAServerAdaptor)>>handle:
[ self handle: context.
		"URL -> String conversion in #responseFrom: needs access to request context for codec"
		context push: self requestHandler during: [ self responseFrom: context ] ] in ZnZincServerAdaptor(WAServerAdaptor)>>process: in Block: [ self handle: context....
FullBlockClosure(BlockClosure)>>ensure:
ZnZincServerAdaptor(WAServerAdaptor)>>process:
ZnSeasideServerAdaptorDelegate>>handleRequest:
[
			self delegate
				ifNil: [ ZnResponse notFound: request uri ]
				ifNotNil: [ :delegate | delegate handleRequest: request ] ] in ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>authenticateAndDelegateRequest: in Block: [...
ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>authenticateRequest:do:
ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>authenticateAndDelegateRequest:
[ self authenticateAndDelegateRequest: request ] in [ [ self authenticateAndDelegateRequest: request ]
			on: ZnRespond
			do: [ :notification | notification response ] ] in ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>handleRequestProtected: in Block: [ self authenticateAndDelegateRequest: request ]
FullBlockClosure(BlockClosure)>>on:do:
[ [ self authenticateAndDelegateRequest: request ]
			on: ZnRespond
			do: [ :notification | notification response ] ] in ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>handleRequestProtected: in Block: [ [ self authenticateAndDelegateRequest: reque[..]
FullBlockClosure(BlockClosure)>>on:do:
ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>handleRequestProtected:
ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>handleRequest:timing:
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>executeOneRequestResponseOn:
[
		[ self executeOneRequestResponseOn: stream ] whileFalse ] in ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>executeRequestResponseLoopOn: in Block: [...
[ activeProcess
			psValueAt: index
			put: anObject.
		aBlock value ] in ZnCurrentOptions(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
ZnCurrentOptions(DynamicVariable)>>value:during:
ZnCurrentOptions class(DynamicVariable class)>>value:during:
[ ZnCurrentOptions value: self during: block ] in ZnOptions>>conditionallyDuring: in Block: [ ZnCurrentOptions value: self during: block ]
UndefinedObject>>ifNil:ifNotNil:
ZnOptions>>conditionallyDuring:
[
			self localOptions conditionallyDuring: block ] in ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>withDynamicVariablesDo: in Block: [...
[ activeProcess
			psValueAt: index
			put: anObject.
		aBlock value ] in ZnCurrentServer(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
ZnCurrentServer(DynamicVariable)>>value:during:
ZnCurrentServer class(DynamicVariable class)>>value:during:
ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>withDynamicVariablesDo:
ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>executeRequestResponseLoopOn:
[ self executeRequestResponseLoopOn: stream ] in [ [ self executeRequestResponseLoopOn: stream ]
		ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ] in [ [ [ self executeRequestResponseLoopOn: stream ]
		ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ]
			ifCurtailed: [ socket destroy ] ] in ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>serveConnectionsOn: in Block: [ self executeRequestResponseLoopOn: stream ]
FullBlockClosure(BlockClosure)>>ensure:
[ [ self executeRequestResponseLoopOn: stream ]
		ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ] in [ [ [ self executeRequestResponseLoopOn: stream ]
		ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ]
			ifCurtailed: [ socket destroy ] ] in ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>serveConnectionsOn: in Block: [ [ self executeRequestResponseLoopOn: stream [..]
FullBlockClosure(BlockClosure)>>ifCurtailed:
[ [ [ self executeRequestResponseLoopOn: stream ]
		ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ]
			ifCurtailed: [ socket destroy ] ] in ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>serveConnectionsOn: in Block: [ [ [ self executeRequestResponseLoopOn: strea[..]
[self value.
			"IMPORTANT: Do not step over next line of code. See method comments for details"
			Processor terminateRealActive] in FullBlockClosure(BlockClosure)>>newProcess in Block: [self value....

vitormcruz avatar Jan 08 '25 17:01 vitormcruz

Hi Vitor,

To allow this, we should add the Grease extension method that is on WriteStream to the Zinc stream classes.

Add this instance method to ZnEncodedWriteStream greaseNext: anInteger putAll: aCollection startingAt: startIndex "Store the next anInteger elements from the given collection."

^ self next: anInteger putAll: aCollection startingAt: startIndex

There are more Zinc classes where this should be added to make it complete, but I think this will solve your problem.

Greetings, Johan

On 8 Jan 2025, at 18:52, Vitor Medina Cruz @.***> wrote:

Pharo 11, Windows, using Seaside 3.5.9

While trying to build a WAHtmlCanvas and storing it in a file, I got a "Instance of ZnCharacterWriteStream did not understand #greaseNext:putAll:startingAt:".

The code used to generate the file is:

aFile writeStreamDo: [ :aFileStream | WAHtmlCanvas builder documentClass: WAHtmlDocument ; rootClass: WAHtmlRoot; fullDocument: true; rootBlock: [ :root | root style: self style ]; render: self on: aFileStream. ] The error stacktrace is:

WAPharoXmlEncoder(WAPharoEncoder)>>nextPutAllFast: WAPharoXmlEncoder(WAPharoEncoder)>>nextPutAll: ByteString(String)>>encodeOn: WAHtmlDocument(WAXmlDocument)>>print: WAHtmlCanvas(WARenderer)>>text: WAHtmlCanvas(WACanvas)>>text: ByteString(String)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: [ self before. canvas render: anObject. self after ] in WAGenericTag(WATagBrush)>>with: in Block: [... FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: WAHtmlCanvas(WACanvas)>>nest: WAGenericTag(WABrush)>>with: WAGenericTag(WATagBrush)>>with: WAHtmlCanvas>>preformatted: [ html preformatted: self preformatedMessageText ] in [ html div class: 'scenario-text-body'; with: [ super body: html ].

     html div
        class: self messageCssBody;
        with: [ html preformatted: self preformatedMessageText ] 
  ] in TomeScenarioErrorViewFragment(TomeScenarioWithMessageViewFragment)>>body: in Block: [ html preformatted: self preformatedMessageText ]

FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: [ self before. canvas render: anObject. self after ] in WAGenericTag(WATagBrush)>>with: in Block: [... FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: WAHtmlCanvas(WACanvas)>>nest: WAGenericTag(WABrush)>>with: WAGenericTag(WATagBrush)>>with: [ html div class: 'scenario-text-body'; with: [ super body: html ].

     html div
        class: self messageCssBody;
        with: [ html preformatted: self preformatedMessageText ] 
  ] in TomeScenarioErrorViewFragment(TomeScenarioWithMessageViewFragment)>>body: in Block: [...

FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: [ self before. canvas render: anObject. self after ] in WAGenericTag(WATagBrush)>>with: in Block: [... FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: WAHtmlCanvas(WACanvas)>>nest: WAGenericTag(WABrush)>>with: WAGenericTag(WATagBrush)>>with: TomeScenarioErrorViewFragment(TomeScenarioWithMessageViewFragment)>>body: [ self body: html ] in TomeScenarioErrorViewFragment(TomeScenarioViewFragment)>>renderOn: in Block: [ self body: html ] FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: [ self before. canvas render: anObject. self after ] in WAGenericTag(WATagBrush)>>with: in Block: [... FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: WAHtmlCanvas(WACanvas)>>nest: WAGenericTag(WABrush)>>with: WAGenericTag(WATagBrush)>>with: TomeScenarioErrorViewFragment(TomeScenarioViewFragment)>>renderOn: [ :scenario | scenario renderOn: html ] in [ scenarios do: [ :scenario | scenario renderOn: html ] ] in [ html div class: 'scenarios-', classTypePrefix. html div class: 'scenarios-body-', classTypePrefix; with: [ scenarios do: [ :scenario | scenario renderOn: html ] ] ] in TomeFeatureView>>renderScenarios:on:usingClassTypePrefix: in Block: [ :scenario | scenario renderOn: html ] OrderedCollection>>do: [ scenarios do: [ :scenario | scenario renderOn: html ] ] in [ html div class: 'scenarios-', classTypePrefix. html div class: 'scenarios-body-', classTypePrefix; with: [ scenarios do: [ :scenario | scenario renderOn: html ] ] ] in TomeFeatureView>>renderScenarios:on:usingClassTypePrefix: in Block: [ scenarios do: [ :scenario | scenario renderO[..] FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: [ self before. canvas render: anObject. self after ] in WAGenericTag(WATagBrush)>>with: in Block: [... FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: WAHtmlCanvas(WACanvas)>>nest: WAGenericTag(WABrush)>>with: WAGenericTag(WATagBrush)>>with: [ html div class: 'scenarios-', classTypePrefix. html div class: 'scenarios-body-', classTypePrefix; with: [ scenarios do: [ :scenario | scenario renderOn: html ] ] ] in TomeFeatureView>>renderScenarios:on:usingClassTypePrefix: in Block: [ ... FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: [ self before. canvas render: anObject. self after ] in WAGenericTag(WATagBrush)>>with: in Block: [... FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: WAHtmlCanvas(WACanvas)>>nest: WAGenericTag(WABrush)>>with: WAGenericTag(WATagBrush)>>with: TomeFeatureView>>renderScenarios:on:usingClassTypePrefix: TomeFeatureView>>renderErrorScenarios:on: [ self renderFailedScenarios: (testResult failures collect: [ :test | test scenarioToRun asScenarioHtml]) on: html. html div class: 'scenario-section-splitter'.

  self renderErrorScenarios: (testResult errors collect: [ :test | test scenarioToRun asScenarioHtml]) on: html.
  html div class: 'scenario-section-splitter'.
  
  self renderPassedScenarios: (testResult passed collect: [ :test | test scenarioToRun asScenarioHtml]) on: html.

] in TomeFeatureView>>renderContentOn: in Block: [... FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: [ self before. canvas render: anObject. self after ] in WAGenericTag(WATagBrush)>>with: in Block: [... FullBlockClosure(BlockClosure)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: WAHtmlCanvas(WACanvas)>>nest: WAGenericTag(WABrush)>>with: WAGenericTag(WATagBrush)>>with: TomeFeatureView>>renderContentOn: WARenderVisitor>>visitPainter: WARenderVisitor(WAPainterVisitor)>>visitPresenter: WARenderVisitor(WAPainterVisitor)>>visitComponent: TomeFeatureView(WAComponent)>>accept: WARenderVisitor(WAVisitor)>>visit: WARenderingGuide(WAPresenterGuide)>>visitPainter: WARenderingGuide(WAPainterVisitor)>>visitPresenter: WARenderingGuide(WAPainterVisitor)>>visitComponent: TomeFeatureView(WAComponent)>>accept: WARenderingGuide(WAPainterVisitor)>>visitDecorationsOfComponent: TomeFeatureView(WAComponent)>>acceptDecorated: WARenderingGuide(WAPresenterGuide)>>visit: TomeFeatureView(WAPainter)>>renderWithContext: TomeFeatureView(WAPainter)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: WABuilder>>render:on: [ :aFileStream | WAHtmlCanvas builder documentClass: WAHtmlDocument ; rootClass: WAHtmlRoot; fullDocument: true; rootBlock: [ :root | root style: self style ]; render: self on: aFileStream. ] in TomeFeatureView>>generateSimplePageOnStream: in Block: [ :aFileStream |... [ aBlock value: stream ] in FileReference(AbstractFileReference)>>writeStreamDo: in Block: [ aBlock value: stream ] FullBlockClosure(BlockClosure)>>ensure: FileReference(AbstractFileReference)>>writeStreamDo: TomeFeatureView>>generateSimplePageOnStream: [ :featureClass | TomeFeatureView new testResult: aTestResult; selectedFeatureClass: featureClass; generateSimplePageOnStream: (self reportingFileFor: featureClass) ] in TomeHTMLReportingChain>>handle: in Block: [ :featureClass |... OrderedCollection>>do: TomeHTMLReportingChain>>handle: TomeHTMLReportingChain(TomeScenarioReportingChain)>>templateHandle: TomeScenarioReportingChain>>handleNext: TomeScenarioReportingChain>>templateHandle: TomeScenarioReportingChain>>startChainFor: [ reportingChainObject startChainFor: aResult ] in TomeFeatureSuite>>runUnmanaged: in Block: [ reportingChainObject startChainFor: aResult ] FullBlockClosure(BlockClosure)>>ensure: TomeFeatureSuite>>runUnmanaged: [ self runUnmanaged: aResult ] in TomeFeatureSuite(TestSuite)>>run: in Block: [... [ self value: anExecutionEnvironment. anExecutionEnvironment activated. aBlock value ] in CurrentExecutionEnvironment class>>activate:for: in Block: [ self value: anExecutionEnvironment.... FullBlockClosure(BlockClosure)>>ensure: CurrentExecutionEnvironment class>>activate:for: TestExecutionEnvironment(ExecutionEnvironment)>>beActiveDuring: DefaultExecutionEnvironment>>runTestsBy: CurrentExecutionEnvironment class>>runTestsBy: TomeFeatureSuite(TestSuite)>>run: TomeFeatureSuite(TestSuite)>>run TomeFeatureView>>renderContentOn: WARenderVisitor>>visitPainter: WARenderVisitor(WAPainterVisitor)>>visitPresenter: WARenderVisitor(WAPainterVisitor)>>visitComponent: TomeFeatureView(WAComponent)>>accept: WARenderVisitor(WAVisitor)>>visit: WARenderingGuide(WAPresenterGuide)>>visitPainter: WARenderingGuide(WAPainterVisitor)>>visitPresenter: WARenderingGuide(WAPainterVisitor)>>visitComponent: TomeFeatureView(WAComponent)>>accept: WARenderingGuide(WAPainterVisitor)>>visitDecorationsOfComponent: TomeFeatureView(WAComponent)>>acceptDecorated: WARenderingGuide(WAPresenterGuide)>>visit: TomeFeatureView(WAPainter)>>renderWithContext: TomeFeatureView(WAPainter)>>renderOn: WAHtmlCanvas(WARenderer)>>render: WAHtmlCanvas(WACanvas)>>render: TomeReportingWebApp>>renderContentOn: WARenderVisitor>>visitPainter: WARenderVisitor(WAPainterVisitor)>>visitPresenter: WARenderVisitor(WAPainterVisitor)>>visitComponent: TomeReportingWebApp(WAComponent)>>accept: WARenderVisitor(WAVisitor)>>visit: WARenderingGuide(WAPresenterGuide)>>visitPainter: WARenderingGuide(WAPainterVisitor)>>visitPresenter: WARenderingGuide(WAPainterVisitor)>>visitComponent: TomeReportingWebApp(WAComponent)>>accept: TomeReportingWebApp(WAPresenter)>>renderUndecoratedWithContext: WAToolDecoration(WADecoration)>>renderNextOn: WAToolDecoration>>renderChildOn: WAToolDecoration>>renderContentOn: WARenderVisitor>>visitPainter: WARenderVisitor(WAPainterVisitor)>>visitPresenter: WARenderVisitor(WAPainterVisitor)>>visitDecoration: WAToolDecoration(WADecoration)>>accept: WARenderVisitor(WAVisitor)>>visit: WARenderingGuide(WAPresenterGuide)>>visitPainter: WARenderingGuide(WAPainterVisitor)>>visitPresenter: WARenderingGuide(WAPainterVisitor)>>visitDecoration: WAToolDecoration(WADecoration)>>accept: WARenderingGuide(WAPainterVisitor)>>visitDecorationsOfComponent: TomeReportingWebApp(WAComponent)>>acceptDecorated: WARenderingGuide(WAPresenterGuide)>>visit: TomeReportingWebApp(WAPainter)>>renderWithContext: WARenderPhaseContinuation>>processRendering: [ :response | self processRendering: response ] in WARenderPhaseContinuation>>handleFiltered: in Block: [ :response | self processRendering: response ] WARequestContext>>respond: WARenderPhaseContinuation(WASessionContinuation)>>respond: WARenderPhaseContinuation>>handleFiltered: [ self filter handleFiltered: aRequestContext ] in WARenderPhaseContinuation(WARequestHandler)>>handle: in Block: [ self filter handleFiltered: aRequestContext ] [ activeProcess psValueAt: index put: anObject. aBlock value ] in WACurrentRequestContext(DynamicVariable)>>value:during: in Block: [ activeProcess... FullBlockClosure(BlockClosure)>>ensure: WACurrentRequestContext(DynamicVariable)>>value:during: WACurrentRequestContext class(DynamicVariable class)>>value:during: WACurrentRequestContext class(GRDynamicVariable class)>>use:during: [ WACurrentRequestContext use: self during: aBlock ] in WARequestContext>>push:during: in Block: [ WACurrentRequestContext use: self during: aB[..] FullBlockClosure(BlockClosure)>>ensure: WARequestContext>>push:during: WARenderPhaseContinuation(WARequestHandler)>>handle: [ super handle: aRequestContext ] in WARenderPhaseContinuation(WASessionContinuation)>>handle: in Block: [ super handle: aRequestContext ] FullBlockClosure(BlockClosure)>>on:do: WARenderPhaseContinuation(WASessionContinuation)>>withUnregisteredHandlerDo: WARenderPhaseContinuation(WASessionContinuation)>>handle: WASession>>handleFiltered: WATimingToolFilter(WARequestFilter)>>handleFiltered: [ super handleFiltered: aRequestContext ] in WATimingToolFilter>>handleFiltered: in Block: [ super handleFiltered: aRequestContext ] FullBlockClosure(BlockClosure)>>ensure: WATimingToolFilter>>handleFiltered: WADeprecatedToolFilter(WARequestFilter)>>handleFiltered: [ super handleFiltered: aRequestContext ] in WADeprecatedToolFilter>>handleFiltered: in Block: [ super handleFiltered: aRequestContext ] FullBlockClosure(BlockClosure)>>on:do: WADeprecatedToolFilter>>handleFiltered: WAMutualExclusionFilter(WARequestFilter)>>handleFiltered: [ super handleFiltered: aRequestContext ] in WAMutualExclusionFilter>>handleFiltered: in Block: [ super handleFiltered: aRequestContext ] FullBlockClosure(BlockClosure)>>ensure: [ self owner: process. aBlock ensure: [ self owner: nil ] ] in WAMutex>>critical: in Block: [... [ caught := true. self wait. blockValue := mutuallyExcludedBlock value ] in Semaphore>>critical: in Block: [... FullBlockClosure(BlockClosure)>>ensure: Semaphore>>critical: WAMutex>>critical: WAMutualExclusionFilter>>handleFiltered: [ self filter handleFiltered: aRequestContext ] in WASession(WARequestHandler)>>handle: in Block: [ self filter handleFiltered: aRequestContext ] [ activeProcess psValueAt: index put: anObject. aBlock value ] in WACurrentRequestContext(DynamicVariable)>>value:during: in Block: [ activeProcess... FullBlockClosure(BlockClosure)>>ensure: WACurrentRequestContext(DynamicVariable)>>value:during: WACurrentRequestContext class(DynamicVariable class)>>value:during: WACurrentRequestContext class(GRDynamicVariable class)>>use:during: [ WACurrentRequestContext use: self during: aBlock ] in WARequestContext>>push:during: in Block: [ WACurrentRequestContext use: self during: aB[..] FullBlockClosure(BlockClosure)>>ensure: WARequestContext>>push:during: WASession(WARequestHandler)>>handle: WAApplication(WARegistry)>>dispatch:to:key: WAApplication(WARegistry)>>handleKeyed:with:context: WAApplication(WARegistry)>>handleFiltered: WAApplication>>handleFiltered: WAExceptionFilter(WARequestFilter)>>handleFiltered: [ super handleFiltered: aRequestContext ] in [ WACurrentExceptionHandler use: handler during: [ super handleFiltered: aRequestContext ] ] in WAExceptionFilter>>handleFiltered: in Block: [ super handleFiltered: aRequestContext ] [ activeProcess psValueAt: index put: anObject. aBlock value ] in WACurrentExceptionHandler(DynamicVariable)>>value:during: in Block: [ activeProcess... FullBlockClosure(BlockClosure)>>ensure: WACurrentExceptionHandler(DynamicVariable)>>value:during: WACurrentExceptionHandler class(DynamicVariable class)>>value:during: WACurrentExceptionHandler class(GRDynamicVariable class)>>use:during: [ WACurrentExceptionHandler use: handler during: [ super handleFiltered: aRequestContext ] ] in WAExceptionFilter>>handleFiltered: in Block: [... FullBlockClosure(BlockClosure)>>on:do: WAWalkbackErrorHandler(WAExceptionHandler)>>handleExceptionsDuring: WAExceptionFilter>>handleFiltered: [ self filter handleFiltered: aRequestContext ] in WAApplication(WARequestHandler)>>handle: in Block: [ self filter handleFiltered: aRequestContext ] [ activeProcess psValueAt: index put: anObject. aBlock value ] in WACurrentRequestContext(DynamicVariable)>>value:during: in Block: [ activeProcess... FullBlockClosure(BlockClosure)>>ensure: WACurrentRequestContext(DynamicVariable)>>value:during: WACurrentRequestContext class(DynamicVariable class)>>value:during: WACurrentRequestContext class(GRDynamicVariable class)>>use:during: [ WACurrentRequestContext use: self during: aBlock ] in WARequestContext>>push:during: in Block: [ WACurrentRequestContext use: self during: aB[..] FullBlockClosure(BlockClosure)>>ensure: WARequestContext>>push:during: WAApplication(WARequestHandler)>>handle: WADispatcher>>handleFiltered:named: WADispatcher>>handleFiltered: [ self filter handleFiltered: aRequestContext ] in WADispatcher(WARequestHandler)>>handle: in Block: [ self filter handleFiltered: aRequestContext ] [ activeProcess psValueAt: index put: anObject. aBlock value ] in WACurrentRequestContext(DynamicVariable)>>value:during: in Block: [ activeProcess... FullBlockClosure(BlockClosure)>>ensure: WACurrentRequestContext(DynamicVariable)>>value:during: WACurrentRequestContext class(DynamicVariable class)>>value:during: WACurrentRequestContext class(GRDynamicVariable class)>>use:during: [ WACurrentRequestContext use: self during: aBlock ] in WARequestContext>>push:during: in Block: [ WACurrentRequestContext use: self during: aB[..] FullBlockClosure(BlockClosure)>>ensure: WARequestContext>>push:during: WADispatcher(WARequestHandler)>>handle: [ self requestHandler handle: aRequestContext ] in ZnZincServerAdaptor(WAServerAdaptor)>>handleRequest: in Block: [ self requestHandler handle: aRequestContext ] FullBlockClosure(BlockClosure)>>on:do: ZnZincServerAdaptor(WAServerAdaptor)>>handleRequest: ZnZincServerAdaptor(WAServerAdaptor)>>handle: [ self handle: context. "URL -> String conversion in #responseFrom: needs access to request context for codec" context push: self requestHandler during: [ self responseFrom: context ] ] in ZnZincServerAdaptor(WAServerAdaptor)>>process: in Block: [ self handle: context.... FullBlockClosure(BlockClosure)>>ensure: ZnZincServerAdaptor(WAServerAdaptor)>>process: ZnSeasideServerAdaptorDelegate>>handleRequest: [ self delegate ifNil: [ ZnResponse notFound: request uri ] ifNotNil: [ :delegate | delegate handleRequest: request ] ] in ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>authenticateAndDelegateRequest: in Block: [... ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>authenticateRequest:do: ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>authenticateAndDelegateRequest: [ self authenticateAndDelegateRequest: request ] in [ [ self authenticateAndDelegateRequest: request ] on: ZnRespond do: [ :notification | notification response ] ] in ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>handleRequestProtected: in Block: [ self authenticateAndDelegateRequest: request ] FullBlockClosure(BlockClosure)>>on:do: [ [ self authenticateAndDelegateRequest: request ] on: ZnRespond do: [ :notification | notification response ] ] in ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>handleRequestProtected: in Block: [ [ self authenticateAndDelegateRequest: reque[..] FullBlockClosure(BlockClosure)>>on:do: ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>handleRequestProtected: ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>handleRequest:timing: ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>executeOneRequestResponseOn: [ [ self executeOneRequestResponseOn: stream ] whileFalse ] in ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>executeRequestResponseLoopOn: in Block: [... [ activeProcess psValueAt: index put: anObject. aBlock value ] in ZnCurrentOptions(DynamicVariable)>>value:during: in Block: [ activeProcess... FullBlockClosure(BlockClosure)>>ensure: ZnCurrentOptions(DynamicVariable)>>value:during: ZnCurrentOptions class(DynamicVariable class)>>value:during: [ ZnCurrentOptions value: self during: block ] in ZnOptions>>conditionallyDuring: in Block: [ ZnCurrentOptions value: self during: block ] UndefinedObject>>ifNil:ifNotNil: ZnOptions>>conditionallyDuring: [ self localOptions conditionallyDuring: block ] in ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>withDynamicVariablesDo: in Block: [... [ activeProcess psValueAt: index put: anObject. aBlock value ] in ZnCurrentServer(DynamicVariable)>>value:during: in Block: [ activeProcess... FullBlockClosure(BlockClosure)>>ensure: ZnCurrentServer(DynamicVariable)>>value:during: ZnCurrentServer class(DynamicVariable class)>>value:during: ZnManagingMultiThreadedServer(ZnSingleThreadedServer)>>withDynamicVariablesDo: ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>executeRequestResponseLoopOn: [ self executeRequestResponseLoopOn: stream ] in [ [ self executeRequestResponseLoopOn: stream ] ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ] in [ [ [ self executeRequestResponseLoopOn: stream ] ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ] ifCurtailed: [ socket destroy ] ] in ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>serveConnectionsOn: in Block: [ self executeRequestResponseLoopOn: stream ] FullBlockClosure(BlockClosure)>>ensure: [ [ self executeRequestResponseLoopOn: stream ] ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ] in [ [ [ self executeRequestResponseLoopOn: stream ] ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ] ifCurtailed: [ socket destroy ] ] in ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>serveConnectionsOn: in Block: [ [ self executeRequestResponseLoopOn: stream [..] FullBlockClosure(BlockClosure)>>ifCurtailed: [ [ [ self executeRequestResponseLoopOn: stream ] ensure: [ self logConnectionClosed: stream. self closeSocketStream: stream ] ] ifCurtailed: [ socket destroy ] ] in ZnManagingMultiThreadedServer(ZnMultiThreadedServer)>>serveConnectionsOn: in Block: [ [ [ self executeRequestResponseLoopOn: strea[..] [self value. "IMPORTANT: Do not step over next line of code. See method comments for details" Processor terminateRealActive] in FullBlockClosure(BlockClosure)>>newProcess in Block: [self value.... — Reply to this email directly, view it on GitHub https://github.com/SeasideSt/Seaside/issues/1451, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHDZZWIKDG6MO7YFAGHWI32JVQUNAVCNFSM6AAAAABU2OXFGOVHI2DSMVQWIX3LMV43ASLTON2WKOZSG43TKOJYGMYTEOI. You are receiving this because you are subscribed to this thread.

jbrichau avatar Jan 10 '25 06:01 jbrichau

Hello,

My workaround for now was to create a String on memory and then write it on the file, which for my use case is fine:

| html |

html := String streamContents: [ :s |
WAHtmlCanvas builder 
	documentClass: WAHtmlDocument ;
	rootClass: WAHtmlRoot;
	fullDocument: true;
	rootBlock: [ :root | root style: self style ];
	render: self on: s.	
].

aFile writeStreamDo: [ :aFileStream | 	aFileStream nextPutAll: html ].

vitormcruz avatar Jan 10 '25 12:01 vitormcruz