mirror of
https://github.com/20kdc/OC-KittenOS.git
synced 2024-12-27 19:38:06 +11:00
6c0659de60
Now if only I actually finished us-perms rather than delaying.
40 lines
904 B
Plaintext
40 lines
904 B
Plaintext
A Quick Note On NeoUX Application
|
|
Structure
|
|
|
|
A typical NeoUX application has one
|
|
window, which it uses .reset on in
|
|
order to change the window contents
|
|
to different things.
|
|
|
|
This is typically achieved with a
|
|
callback to regenerate the window,
|
|
used like this:
|
|
|
|
window = neoux.create(mainWin())
|
|
|
|
and to regenerate the window:
|
|
|
|
window.reset(mainWin())
|
|
|
|
This allows a simple way to write big
|
|
UI trees without going totally nuts.
|
|
|
|
A good example of this is app-flash,
|
|
but unlike most of the examples, it
|
|
does not change the regeneration
|
|
callback (it never has to - the
|
|
labelling window never needs to be
|
|
regenerated after it's switched to,
|
|
so the only regeneration is for the
|
|
main window.)
|
|
|
|
A full application of this technique
|
|
would regenerate the window whenever
|
|
anything occurs of interest.
|
|
|
|
-- This is released into
|
|
the public domain.
|
|
-- No warranty is provided,
|
|
implied or otherwise.
|
|
|