tcl-hacks

Check-in [ea0ae249f7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:update readme. Nearly there
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ea0ae249f708f9c0e75a197425c7b2a73cd410a8
User & Date: aspect 2018-05-17 13:01:14
Context
2018-05-17
13:14
redraw wants attention .. or do I live with overdrawing for now? check-in: 1cd0a87f38 user: aspect tags: trunk
13:01
update readme. Nearly there check-in: ea0ae249f7 user: aspect tags: trunk
12:43
Multi-line input working, by putting it in [class Getline] rather than the failed separation through subclassing. Net code reduction and getline.tcl still <400loc, so it seems sound. check-in: 6aa8964556 user: aspect tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to getline/README.md.

1
2
3
4
5
6


7
8
9
10
11
12
13
## STATUS:

 - state-management bugs have been introduced, causing too many overdraws and multi-line to go wiggy
   - fixable, specifically by examining the Getlines/Getline inheritance relationship
 - still needs a little bit of factoring to make a loadable module
 - most of core functionality is there and "tested" - see top of getline.tcl for details



!IMPORTANT!: call [getline] from inside a coroutine, so it can yield to the event loop.  If you prefer a callback style, it's just a few lines of code:

    proc getline_cb {cmd args} {
        while 1 {$cmd {*}$args [getline]}
    }
    coroutine getline#[info cmdcount] getline_cb mycallbackproc


|
|
|

>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
## STATUS:

 - redraws too much
 - yeah it's slow, have you tried taking out the [after 10] in tty::emit?
 - still needs a little bit of factoring to make a well-behaved loadable module
 - most of core functionality is there and "tested" - see top of getline.tcl for details
 - I might want to specially name the exposable commands - eg :forth ?
 - a call graph would be pretty neat to see

!IMPORTANT!: call [getline] from inside a coroutine, so it can yield to the event loop.  If you prefer a callback style, it's just a few lines of code:

    proc getline_cb {cmd args} {
        while 1 {$cmd {*}$args [getline]}
    }
    coroutine getline#[info cmdcount] getline_cb mycallbackproc