added some experimental code

This commit is contained in:
hyunghwan.chung
2016-08-23 00:37:22 +00:00
parent cba78a7ec0
commit ff00284426
3 changed files with 75 additions and 18 deletions

View File

@ -55,6 +55,36 @@
}
#class MyConsole(Console)
{
#method box: origin corner: corner
{
| tmp |
self setCursor: origin.
self write: '+'.
(corner x - origin x - 2) timesRepeat: [self write: '-'].
self write: '+'.
tmp := Point new.
(origin y + 1) to: (corner y - 1) by: 1 do: [ :i |
tmp x: origin x y: i.
self setCursor: tmp.
self write: '|'.
tmp x: corner x.
self setCursor: tmp.
self write: '|'.
].
tmp x: origin x y: corner y.
self setCursor: tmp.
self write: '+'.
(corner x - origin x - 2) timesRepeat: [self write: '-'].
self write: '+'.
}
}
#class MyObject(TestObject)
{
#method(#class) main
@ -62,8 +92,9 @@
| v1 v2 |
System logNl: 'START OF MAIN'.
v1 := Console output.
v1 := MyConsole output.
v1 clear.
v1 box: 0@0 corner: 80@20.
v1 write: S'hello, \n'.
v1 write: S'하하하하하하하하 (^o^) ほのかちゃん \n'.
v1 close.