Is Scilab does differentiate between undefined variable TOOLBOX_TITLE and toolbox_title which is showing error?

I got an error of undefined variable, but I did not find the with small letter toolbox_title, but I found 4 files with TOOLBOX_TITLE showing the variable.

--> exec('/Users/vimalchawda/Desktop/spacecraft-gnc-tbx/builder.sce',-1)
Building macros...
-- Creation of [spacecraft_gnc_tbxlib] (Macros) --
genlib: Processing file: Kalman_Filter_Utils.sci
Building blocks...
Building help...

Building the master document:
	/Users/vimalchawda/Desktop/spacecraft-gnc-tbx/help/en_US
operation +: Warning adding a matrix with the empty matrix will give an empty matrix result.
operation +: Warning adding a matrix with the empty matrix will give an empty matrix result.
operation +: Warning adding a matrix with the empty matrix will give an empty matrix result.

Building the manual file [javaHelp] in /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/help/en_US.
at line    48 of function tbx_build_help_loader ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/modules_manager/macros/tbx_build_help_loader.sci line 63 )
at line     5 of executed file /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/help/en_US/build_help.sce
at line    13 of function tbx_builder           ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/modules_manager/macros/tbx_builder.sci line 26 )
at line    49 of function tbx_builder_help_lang ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/modules_manager/macros/tbx_builder_help_lang.sci line 64 )
at line     4 of executed file /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/help/builder_help.sce
at line    71 of function tbx_builder_help      ( /Applications/scilab-2024.0.0.app/Contents/share/scilab/modules/modules_manager/macros/tbx_builder_help.sci line 87 )
at line    35 of function main_builder          ( /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/builder.sce line 45 )
at line    51 of executed file /Users/vimalchawda/Desktop/spacecraft-gnc-tbx/builder.sce

Undefined variable: toolbox_title

Can anyone please explain what type or error am I dealing with?

I got this issue with MAC 2024 version, but same code is used on 5.2.2 than it work smoothly. Is it new developer issue or what type such issue fall into ?

Hi @Vimsrocz ,

It seems to be an issue in tbx_build_help_loader function. We will fix it in next Scilab version. Until then, can you try to define the toolbox_title by adding toolbox_title = TOOLBOX_TITLE in your builder.sce file (it may make your code work)?

Vincent

For the record, here is the associated issue: tbx_build_help_loader returns an error about undefined variable. (#17235) · Issues · scilab / scilab · GitLab

Not really

//

mode(-1);
lines(0);
function main_builder()

    TOOLBOX_NAME  = "spacecraft_gnc_tbx";
    TOOLBOX_TITLE = "Spacecraft GNC Toolbox";
    toolbox_dir   = get_absolute_file_path("builder.sce");

    // Check Scilab's version
    // =============================================================================

    // check minimal version (xcosPal required)
    if ~isdef("xcosPal") then
        // and xcos features required
        error(gettext("Scilab 5.3.2 or more is required."));
    end

    // Check modules_manager module availability
    // =============================================================================

    if ~isdef("tbx_build_loader") then
        error(msprintf(gettext("%s module not installed."), "modules_manager"));
    end


    if ~isdir(toolbox_dir+filesep()+"images"+filesep()+"h5")
        [status, msg] = mkdir(toolbox_dir+filesep()+"images"+filesep()+"h5");
        if and(status <> [1 2])
            error(msg);
        end
    end

    // Action
    // =============================================================================

    tbx_builder_macros(toolbox_dir);
    tbx_builder_help(toolbox_dir);
    tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
    tbx_build_cleaner(TOOLBOX_NAME, toolbox_dir);
endfunction

if with_module("xcos") then
    main_builder();
    clear main_builder; // remove main_builder on stack
end

Can you please point out? Where to add, as I added last and multiple position, but it is not working? Can you please point out, and we can talk or personal message me, so I can give you accesses to resolve issue fast?

Error is

Undefined variable: toolbox_title

Hi

Do you know if there is another version is available without defect?

toolbox_title = TOOLBOX_TITLE must be inserted before calling tbx_builder_help and it may work.

Thank you . Its working. Let me close this issue.