35 posts
Location
why do you want to know
Posted 26 May 2018 - 01:35 PM
I can do simple things in a floating window (like print), but os.pullEvent or read() do not function at all.
(it uses loadfile and coroutines)
7083 posts
Location
Tasmania (AU)
Posted 26 May 2018 - 02:05 PM
Seems you forgot to link to said window manager. You've also neglected to mention what os.pullEvent() / read() do do - what errors or other unexpected behaviour are you actually encountering?
35 posts
Location
why do you want to know
Posted 26 May 2018 - 02:09 PM
Seems you forgot to link to said window manager. You've also neglected to mention what os.pullEvent() / read() do do - what errors or other unexpected behaviour are you actually encountering?
With read(), I get no errors, it just says 'press any key to continue'.
Source code:
https://pastebin.com/M4TVQQ8r/firefly/sys/test.lua is just 'term.write' and 'read()'.
Edited on 26 May 2018 - 12:11 PM
7083 posts
Location
Tasmania (AU)
Posted 26 May 2018 - 02:19 PM
Ah, right, I'm afraid you can't just resume a coroutine once and expect it to run to completion - ComputerCraft scripts commonly yield, and you need to catch data from them as they do so, before resuming them again with whatever type of event data they might request.
See this example, and / or
read this treatise.
35 posts
Location
why do you want to know
Posted 31 May 2018 - 02:46 PM
(Fixed)