Menu

Commit [r13041]  Maximize  Restore  History

.NET MENU: variable option names, and SHOW/HIDE/NEXT OPTION

COMMAND takes char_or_var_vl, so an option's name is often a variable
and only known at run time. Two consequences, both verified against the
C runtime:

Option text is trimmed before it goes on the wire - a CHAR(20) variable
holding "Customer" must not reach the client as "Customer ".
The menu title is deliberately NOT trimmed, because the C does not trim
it either.

SHOW OPTION, HIDE OPTION and NEXT OPTION address an option by its text
rather than its position, so they take a string. The enum still names
the COMMAND clause for dispatch - the clause count is fixed by the
source however dynamic the names are - and TextOf() maps a clause back
to its current text for callers that only hold the enum.

mikeaubury 2026-09-02

changed /aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiDialog.cs
changed /aubit4glsrc/trunk/dotnet/tests/Aubit4GL.Runtime.Tests/MenuTests.cs
/aubit4glsrc/trunk/dotnet/src/Aubit4GL.Runtime/Ui/UiDialog.cs Diff Switch to side-by-side view
Loading...
/aubit4glsrc/trunk/dotnet/tests/Aubit4GL.Runtime.Tests/MenuTests.cs Diff Switch to side-by-side view
Loading...