Add local string Buffer, fix speed issues

This commit is contained in:
Jacob
2018-11-20 00:35:39 -05:00
parent aa68debd81
commit af2f0442bf
6 changed files with 54 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ class ActionView(val interp: Interpreter, val ioView: IOView) : View() {
button("run") {
setOnAction {
runTimeline.rate = 1000.0
runTimeline.rate = 10000000.0
runTimeline.playFromStart()
}
}

View File

@@ -14,5 +14,7 @@ class CodeView(val interp: Interpreter) : View() {
}
override val root = textarea(srcProperty) {
prefRowCount = 25
prefColumnCount = 80
}
}

View File

@@ -27,6 +27,35 @@ class EditorView : View("Befide") {
}
init {
codeView.src = """64+"!dlroW ,olleH">:#,_@"""
codeView.src = """>84*>:#v_55+"ude.ub@yelruta">:#,_@>188*+>\02p\12p\:22p#v_${'$'} 55+,1- v
^ 0 v +1\ _^#-+*< >22g02g*"_@"*-!1- #v_v>
>:>::3g: ,\188 ^^ -1\g21\g22<p3\"_":<
________________________________@_________________________________^ p3\"@":<"""
// codeView.src = """--------------------------------------------------------------------------------
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// |-
// """.trimMargin()
}
}

View File

@@ -16,9 +16,11 @@ class IOView(val interp: Interpreter) : View() {
init {
interp.outputChanged += {
var str = ""
while (!interp.stdOutput.isEmpty()) {
output += interp.stdOutput.remove()
str += interp.stdOutput.remove()
}
output += str
}
// add listeners to interp, handle streams, idk
}