Comments (1)
This may already be done, or at least trivial, using KonsoleData. However, that's not currently available to the RunScope yet, and maybe we shouldn't expose it directly. We'll need to think about the API carefully.
But otherwise, right now you'd do this as something like
class BlinkingCursorState {
object Key = KonsoleData.Key<BlinkingCursorState>()
var blinkOn by KonsoleVar(false)
}
/* ... */
data.putIfAbsent(
BlinkingCursorState.Key,
provideInitialValue = { BlinkingCursorState() }
dispose = { blinkOn = false }
)
It's possible that
.run {
onFinishing {
/* ... */
}
}
works under the hood by putting in a dummy object into the block data which triggers the callback on dispose.
from kotter.
Related Issues (20)
- Higher level API for building console applications HOT 1
- Section created as extension function does not update when livevar changes HOT 1
- can't write to last row of terminal HOT 1
- onKeyPressed doesn't listen for modified (e.g. ctrl-u, alt-a, etc.) characters HOT 1
- Windows Virtual Terminal Incorrectly Sizes Border HOT 4
- Request for Information on Sidebar's creation Using Off-Screen Api. HOT 3
- Add support for row-span / col-span in grid HOT 1
- Opening two session after another results in undefined behaviour of user input HOT 9
- Testing of extension methods HOT 25
- terminal.assertMatches not behaving as expected when testing input HOT 1
- Larger tests become flaky HOT 5
- Strange behaviour with key presses after using onKeyPressed or runUntilKeyPressed HOT 1
- Can't use Kotter without virtual terminal HOT 18
- Kotter is missing my native target
- Windows flickers if the content being redrawn is larger than the entire screen HOT 2
- K/N repaints duplicate lines if any particular line is too long horizontally HOT 2
- Add a test for Terminal#width HOT 1
- Windows + Kotlin/Native: Repaint issues reported (on legacy OS versions?) HOT 2
- K/N: Arithmetic Exception HOT 13
- Allow configuring fonts if possible
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotter.