Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: make port! [scheme: 'event]

From: jeff:rebol at: 22-Jun-2001 9:01

Howdy, Cyphre:
> Will be cool if I can open View window and will be able to > use console for another tasks while View-port is running. > Will be to much invasive to make rebol proces multithraded? > What is your opinion on that(Jeff, Holger, Carl, anyone?) > > Regards > > Cyphre
REBOL [ Title: "Quasi-asynchronous view" ] ;-- Simple console emulation ; many console features (history, ; tab completion, etc.) not implemented buf: copy "" con: open/binary/direct [ scheme: 'console awake: func [port /local c r][ prin c: to-char first port either find "^M^J" c [ if not unset? set/any 'r do buf [ print [newline "==" copy/part mold get/any 'r 20 " ... "] ] prin ">> " clear buf ][ ;-- basic editing either c = #"^h" [ remove back tail buf ][append buf c] ] ] ] view/new layout [ size 300x300 vh3 "Use the console" button "Click on me" button "We're all alive" ] prin ">> " append system/ports/wait-list con forever [wait .02]