Skip to content
New issue

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

Single method to file #377

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

keinstein
Copy link

Hi,

I fixed some additonal bugs and crashes. Furthermore I implemented converting a single method to a file.

Since I'm using a powerful external editor (emacs) for coding and use a version control system, I prefer to keep all my Lua methods in separate files. The current implementation always re-exports already exported methods. This breaks the panel as the exported methods get new names in the tree while the panel still uses the old names. I tried to fix that and added both in the editor menu and the context menu an entry to export a single method to a file. The reverse can be easily added if there is need for it.

jmechnich and others added 20 commits October 13, 2021 12:14
- added vst2sdk to header search path
- use standard AU type 'aumi'
This patch circumvents program aborts when
 - The window is too small so that the text width may get negative
 - uiImageSlider is fully initialised, so that the slider range contains invalid data
…name.

When a Lua chank has a name, after the compilation an extended type of the
variable with the chunk's name is stored in the CtrlrLuaMethod object.
Errors are defined as additional types. This complies to the fact that a
Lua chunk can contain everything, not only a single functions.

The function isValid() changed its semantics from “running fine, so far”
to “no probable error has been detected, so far“. In this sense a named Lua
chunk that does not define a variable with the chunk's name is considered to
probably contain an error. The function isValid() is mainly used to inform
the Ctrlr user/programmer that a certain chunk is problematic in some way,
which meens colouring its name red if isValid() returns false.

In order to invalid calls to the Lua variable a function isCallable() has
been introduced. It returns true iff the Lua chunk defines a function with
the chunk's name that compiles fine and did not raise any Lua error so far.
So, isCallable() covers most of the cases where isValid() had been called
until this patch.

In order to avoid unnecessary confusion “json4lua“ has been renamed to “json”
and “debugger.lua” has been renamed to “debugger”.
This helps to find out to which panel an error message belongs to.
Especially on startup, when many panels are loaded at once.
A thread should be running either as detached thread or as joinable thread.
JUCE blurres this nomenclature with their own words.

In general creating and deleting a system thread is expensive.
So it should be deleted when it is save (i.e. not in realtime functions).

This patch solves several issues with the thread:
- the thread should exit if it gets signalled by setting a special
  variable. This variable is handled by JUCE.
- The main program should signal the thread to end its action. This is done
  by stopThread() by setting the status variable and waking up the thread.
- When the thread ends before the main program allows it to end,
  it must wait indefinitely. Otherwise an undefined state with a race
  condition is created, which may cause additional trouble.
	This allows the compiler to warn about unimplemented values.
	* using menu of the file editor
	* from the method tree context menu
@RomanKubiak RomanKubiak force-pushed the master branch 5 times, most recently from 9eacd2a to d4a15a8 Compare June 20, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants