Commit graph

5893 commits

Author SHA1 Message Date
Matthijs Kooijman
c5314fe17a custom-module: Call reload() function on auto-reload
This allows modules to re-initialize any state they need whenever the
module is reloaded.

Without this, any such initialization can also be done in the top
level of the custom module, but this has two problems:

 1. Top-level module code runs on load and reload, and for the initial
    load, it runs *before* the connections are set up, so trying to use
    send() would produce an error on load (not reload).

 2. Top-level module code runs for the primary custom module, but also
    for any nested modules, removing control about the process and
    ordering from the primary custom module. In addition, a module that
    can be used both as primary and nested module, there is no clean way
    to distinguish between these cases.

Both of these problems can be solved by doing some bookkeeping in the
global object, but that produces messy code.

This commit allows modules to define a reload() function, which is
called (for the primary module only) after the module is reloaded. This
means that any initialization for the first load can be done in init()
and for reloads in reload(), and in both cases all connections will
already have been set up solving issue 1. In addition, neither of these
functions are called for nested modules, solving issue 2 (and the
primary module can then stil explicitly call a reload function on nested
modules if needed, as shown in the examples).
2024-06-18 09:37:01 +02:00
Matthijs Kooijman
a3194a3bb8 custom-module: Fix example for unload with nested modules
The unload method is actually called on all modules, not just the main
one, so it makes no sense to have the module merger example call it
explicitly on its submodules.
2024-06-18 09:32:35 +02:00
jean-emmanuel
a8f9c263a2 package: update package.lock 2024-04-12 18:30:34 +02:00
jean-emmanuel
a4f27e32d4 package: fix building with node <= 20 2024-04-12 18:30:06 +02:00
jean-emmanuel
ac995b2dd1 lint 2024-04-03 10:01:05 +02:00
jean-emmanuel
a71df8177f advanced syntaxes: display an error in the console in some unsupported advanced syntaxes use cases 2024-04-03 09:50:28 +02:00
jean-emmanuel
b31b911a15 package: next is 1.26.2 2024-04-03 08:48:25 +02:00
jean-emmanuel
20d5091622 server: fix cookie parsing (user resources not loading when using an external browser) 2024-04-03 08:47:19 +02:00
jean-emmanuel
ededaee55b misc: lint 2024-03-13 18:17:41 +01:00
jean-emmanuel
0e68557b85 advanced syntaxes: restore stupid-simple resolution order, deduping value changes brings more problem than it solves
history: fe682693b1, 0e54c11f13, 182941a22c, 3a5fdf17c7, 8b92400c1e
2024-03-13 18:04:43 +01:00
jean-emmanuel
1a4b971b18 mac: unable to show launcher windows when starting minimized 2024-02-22 09:29:35 +01:00
jean-emmanuel
b63402fce8 docs: update widget ref 2024-02-21 11:06:09 +01:00
jean-emmanuel
fb09616030 package: v1.26 2024-02-21 11:05:30 +01:00
jean-emmanuel
0ecc104f4b lint 2024-02-21 11:02:49 +01:00
jean-emmanuel
e87891cb7c switch: allow resubmitting the same value 2024-02-21 11:01:50 +01:00
jean-emmanuel
3ed11f3894 custom-module: expose tcpServer 2024-02-21 10:52:40 +01:00
jean-emmanuel
fbfa41bd5a launcher: allow dropping files into file fields 2024-02-21 10:31:24 +01:00
jean-emmanuel
f78814ba45 launcher: start hidden on mac is "start minimized" is set 2024-02-21 10:10:55 +01:00
jean-emmanuel
d387397c14 modal: ios 15+ layering issue 2024-02-18 17:03:34 +01:00
jean-emmanuel
dfcf158808 range: colorKnob 2024-02-18 15:35:17 +01:00
jean-emmanuel
476f07ec60 sliders: knob color property ok 2024-02-18 15:29:38 +01:00
jean-emmanuel
ebd14015de docs: client sync dets 2024-02-15 08:34:31 +01:00
jean-emmanuel
f63bb0f24d fader: add colorKnob property 2024-02-14 20:06:28 +01:00
jean-emmanuel
11fc7d2b56 multixy: add axisLock; bypass axisLock with Shift 2024-02-14 19:53:01 +01:00
jean-emmanuel
0f2cb1b0af xy: add axisLock property; allow locking one the axis by holding Shift while dragging 2024-02-14 19:35:17 +01:00
jean-emmanuel
48c78a1d12 plot: missing logScaleX and logScaleY properties 2024-02-14 14:23:55 +01:00
jean-emmanuel
b555169cef dropdown: allow resubmitting the same value 2024-02-14 14:19:37 +01:00
jean-emmanuel
5f4c2c60be ipc: prevent stuck disconnected notif 2024-02-13 21:31:46 +01:00
jean-emmanuel
5184498b9a package: version bump 2024-02-13 21:31:19 +01:00
jean-emmanuel
8b92400c1e widgets: solve multi-value-dependency pattern resolution using a single queue instead of timeouts 2024-02-13 17:38:45 +01:00
jean-emmanuel
e2215b865a docs: python-rtmidi manual install update 2024-02-13 14:31:33 +01:00
jean-emmanuel
87ad29fa23 scripting: getProp() now correctly returns a copy of the property if it is an object 2024-02-13 14:24:26 +01:00
jean-emmanuel
690add4b38 server: fix config file read/write initial check 2024-02-04 09:57:22 +01:00
jean-emmanuel
bf8d9799cc modal: remove debug log 2024-01-22 18:50:59 +01:00
jean-emmanuel
8c77ab7ca6 docs: update ref 2024-01-17 16:43:22 +01:00
jean-emmanuel
bc4e1952e9 package: next is 1.25.7 2024-01-17 16:41:10 +01:00
jean-emmanuel
86e819870c root: add onPreload scripting property 2024-01-17 16:31:27 +01:00
jean-emmanuel
a04c658bb5 input: allow using a number in numeric to specify stepping value for mousewheel interaction 2024-01-17 16:16:09 +01:00
jean-emmanuel
9181c2a3aa remote control: /EDIT* commands sent by a custom module are not affected by the server's read-only option anymore 2024-01-17 16:05:03 +01:00
jean-emmanuel
3a5fdf17c7 widgets: prevent value update event from interfering with a container creating its children 2024-01-17 15:40:57 +01:00
jean-emmanuel
0d66f2b8a8 docs: add tutorial, rm cpu warning for /EDIT (mostly irrelevant today) 2023-11-30 13:21:20 +01:00
jean-emmanuel
4ef3595125 server: print config file read error 2023-11-23 09:42:32 +01:00
jean-emmanuel
e4db027085 sliders: steps error (#835) 2023-11-23 09:38:15 +01:00
jean-emmanuel
a6237a0aac scripting: stateSet: add optional {send: false} flag 2023-11-22 10:15:40 +01:00
jean-emmanuel
2c97ac662c docs: small fix 2023-10-14 11:51:31 +02:00
jean-emmanuel
91507ff3a9 misc: rm old files 2023-09-25 11:30:34 +02:00
jean-emmanuel
e4b45b1a6b sliders: round steps to avoid errors 2023-09-14 08:07:09 +02:00
jean-emmanuel
4d7ef455ce log: phrasing 2023-09-13 21:58:35 +02:00
jean-emmanuel
58540eda0c modal: fix closing when doubleTap is true 2023-09-13 21:54:30 +02:00
jean-emmanuel
07b921d157 button: issue with value init (see previous commit) 2023-09-13 20:25:51 +02:00