diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-08-14 09:38:30 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | 90fafe906e99311bacca56ebb444bf99ea3f7804 (patch) | |
| tree | 9722a1e2cd626697caee799c873086f37ccd7bd4 /alv/copilot | |
| parent | document and spec Type member fields (diff) | |
| download | alive-90fafe906e99311bacca56ebb444bf99ea3f7804.tar.gz alive-90fafe906e99311bacca56ebb444bf99ea3f7804.zip | |
separate Module and IO code
Diffstat (limited to 'alv/copilot')
| -rw-r--r-- | alv/copilot/base.moon | 10 | ||||
| -rw-r--r-- | alv/copilot/fltk.moon | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/alv/copilot/base.moon b/alv/copilot/base.moon index fcd1ff4..40600cb 100644 --- a/alv/copilot/base.moon +++ b/alv/copilot/base.moon @@ -4,7 +4,7 @@ -- @classmod Copilot lfs = require 'lfs' import Scope from require 'alv.scope' -import Module from require 'alv.module' +import FSModule from require 'alv.module' import Error from require 'alv.error' import RTNode from require 'alv.rtnode' import Constant from require 'alv.result' @@ -33,8 +33,8 @@ class Copilot --- create a new Copilot. -- @classmethod - -- @tparam string file name/path of the alive file to watch and execute - new: (@args) => + -- @tparam table args + new: (@args={}) => @T = 0 @last_modification = 0 @last_modules = {} @@ -62,7 +62,7 @@ class Copilot @active_modules = nil @last_modules.__root = nil - @last_modules.__root = Module file + @last_modules.__root = FSModule file @active_module = @last_modules.__root COPILOT = nil @@ -84,7 +84,7 @@ class Copilot else last = @active_module prefix = if b = last.file\match'(.*)/[^/]*$' then b .. '/' else '' - mod = @last_modules[name] or Module "#{prefix}#{name}.alv" + mod = @last_modules[name] or FSModule "#{prefix}#{name}.alv" L\trace "entering module #{mod}" @modules[name] = mod @active_module = mod diff --git a/alv/copilot/fltk.moon b/alv/copilot/fltk.moon index 7664f0c..a4e3d08 100644 --- a/alv/copilot/fltk.moon +++ b/alv/copilot/fltk.moon @@ -86,9 +86,9 @@ visit #{version.web} for more information." @status.value = if not @active_module "no script" elseif @paused - "paused | #{@active_module\basename!}" + "paused | #{@active_module\name!}" else - "running | #{@active_module\basename!}" + "running | #{@active_module\name!}" @window\redraw! eval: (dirty) => |
