1
0
mirror of https://github.com/lxsang/Diya-API.git synced 2024-12-27 03:48:21 +01:00

print log using stdout instead of Transcript

This commit is contained in:
Dany LE 2021-12-19 22:41:21 +01:00
parent 1884963e4e
commit 29e4065fe1
3 changed files with 24 additions and 4 deletions

View File

@ -0,0 +1,6 @@
Extension { #name : #ClassDescription }
{ #category : #'*Diya' }
ClassDescription >> classCommentBlank [
^ ''
]

View File

@ -3,3 +3,13 @@ Class {
#superclass : #Object, #superclass : #Object,
#category : #'Diya-Core' #category : #'Diya-Core'
} }
{ #category : #accessing }
DiyaBaseObject >> stderr [
VTermOutputDriver stderr
]
{ #category : #accessing }
DiyaBaseObject >> stdout [
^ VTermOutputDriver stdout
]

View File

@ -72,7 +72,10 @@ DiyaBoot >> init [
{ #category : #events } { #category : #events }
DiyaBoot >> initialize [ DiyaBoot >> initialize [
running := true running := true.
display := nil.
window := nil.
renderer := nil.
] ]
{ #category : #events } { #category : #events }
@ -139,8 +142,8 @@ DiyaBoot >> setCursorPosition: mappedEvt [
{ #category : #logging } { #category : #logging }
DiyaBoot >> showSystemInfo [ DiyaBoot >> showSystemInfo [
|stream numdriver rinfo | |stream numdriver rinfo|
stream := String new writeStream. stream := (String new: 255) writeStream.
stream nextPutAll:'System: '; stream nextPutAll:'System: ';
nextPutAll:(Smalltalk globals at: #CODENAME ifAbsent:['']); nextPutAll:(Smalltalk globals at: #CODENAME ifAbsent:['']);
nextPutAll: '-v'; nextPutAll: '-v';
@ -167,12 +170,13 @@ DiyaBoot >> showSystemInfo [
nextPutAll:display w asString; nextPutAll:display w asString;
nextPutAll: 'x'; nextPutAll: 'x';
nextPutAll: display h asString; cr. nextPutAll: display h asString; cr.
Transcript show: stream contents self stdout nextPutAll: stream contents
] ]
{ #category : #events } { #category : #events }
DiyaBoot >> startx [ DiyaBoot >> startx [
display ifNil: [ ^self error: 'Please run #init before this method' ].
window := self createWindow. window := self createWindow.
renderer := self createRenderer. renderer := self createRenderer.
self showSystemInfo. self showSystemInfo.