View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002852 | The Dark Mod | Coding | public | 02.09.2011 14:06 | 02.09.2011 17:04 |
Reporter | tels | Assigned To | tels | ||
Priority | normal | Severity | normal | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 1.06 | ||||
Target Version | TDM 1.07 | Fixed in Version | TDM 1.07 | ||
Summary | 0002852: fix GUI command handling with args in HandleMainMenuCommands() | ||||
Description | HandleMainMenuCommands() is called for each command or argument from the GUI: set "cmd" "log 'argument'" results in the following calls: HandleMainMenuCommands("log") HandleMainMenuCommands("argument") and this: set "cmd" "mainmenu_heartbeat" results in: HandleMainMenuCommands("mainmenu_heartbeat") HandleMainMenuCommands(";") this makes it impossible to recover arguments to commands (except for "log", which is special-cased in the code). | ||||
Additional Information | The code needs to be changed so that it keeps a stack of "command" "arg1" "arg2" etc, and when it sees ";", then it executes the first command (and the arguments are then available). This also means adding ";" to each command in the gui, otherwise the final ";" call might be missing and we are not able to distinguish the command "log" from the argument "log"; Alternatively, we could also hard-code the number of arguments for each command, and ignore stray ";" commands. | ||||
Tags | No tags attached. | ||||
Resolved this by completely rewriting the logic in HandleMainMenuCommands(), checked in as revision 0004964. * We watch for the first command, ignoring any stray ";". * Once seen, we deduce the number of arguments (a small hard-coded list, with the default being 0) * we then collect arguments until we have enough * then handle (or ignore) the command A few special cases are handled, too, like 'set "notime" "1"' resulting in three calls with "set", "notime" and "1". |
|
Date Modified | Username | Field | Change |
---|---|---|---|
02.09.2011 14:06 | tels | New Issue | |
02.09.2011 14:06 | tels | Assigned To | => tels |
02.09.2011 17:03 | tels | Note Added: 0004013 | |
02.09.2011 17:03 | tels | Status | new => resolved |
02.09.2011 17:03 | tels | Fixed in Version | => TDM 1.07 |
02.09.2011 17:03 | tels | Resolution | open => fixed |
02.09.2011 17:04 | tels | Target Version | => TDM 1.07 |