numere-org / NumeRe

Framework for numerical computations, data analysis and visualisation
https://www.numere.org
GNU General Public License v3.0
20 stars 7 forks source link

'dialog' do not accept tables for their default values #44

Closed numeredev closed 1 year ago

numeredev commented 1 year ago

DESCRIPTION

Describe the bug The dialog command does not accept strings coming from a table as their default value.

To Reproduce Steps to reproduce the behavior:

  1. Create a table TABLE() containing strings used as default values
  2. Execute dialog TABLE(:,1) -set type=listeditor title="NumeRe: Create record" msg="Create new database record";
  3. See error

Expected behavior The strings from the selected column are displayed within the dialog.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

(Do not write below this line)


DEVS' SECTION

ANALYSIS

In dialogCommand() (part of winlayout.cpp) is only checked, whether the expression is a string expression, but possible accesses to any table are omitted. Add a check, whether tables are used in the expression and resolve them correspondingly.

IMPLEMENTATION STEPS

(see also our Wiki for implementation guidelines)

DOCUMENTATION STEPS

(see also our Wiki for further information)

PULL REQUEST