Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The current hook system isn't all that intuitive. May be entirely removed in favor of something similar to the old event system. Perhaps like
--@import see.event.Events --@import me.event.RegisteredEvent function MyProgram.main() Events.register("registered_event", RegisteredEvent) while true do -- Automatically casts to particular event object for -- standard events. For non-registered custom events, -- use Event.args. local event = Events.pull( "char", "key", "modem_message", "custom_event", "registered_event") if event.type == "char" then System.print(event.char) elseif event.type == "key" then System.print(event.key) elseif event.type == "modem_message" then System.print(event.message) elseif event.type == "custom_event" then System.print(event.args) elseif event.type == "registered_event" then System.print(event.customField) end end end
The text was updated successfully, but these errors were encountered:
Merged into master as of commit 50.
Sorry, something went wrong.
Merge pull request #1 from sci4me/events
c6cd3d7
fixed native events..
No branches or pull requests
The current hook system isn't all that intuitive. May be entirely removed in favor of something similar to the old event system. Perhaps like
The text was updated successfully, but these errors were encountered: