The current pasting functionality might not be good usable anymore, because of the tabulator key is assigned to the autocompletion feature in the console. Add a table viewer functionality, which allows pasting data visual and sending them to the kernel.
Because the functionality seems to be similar, this feature can implemented with a somehow inplace editing function of caches. It needs a wxGrid for editing, an accept and a cancel button and an internal data transfer/wait loop (similar to the prompt loop) for transfering the data.
Analysis:
The existing table viewer can be extended with a read-only flag indicating whether inplace editing of the tabular data is desired or not. In addition, an extended keydown handler is needed, adding additional lines and columns, if needed.
To achieve the desired pasting functionality, the logics from the kernel have to be implemented in the table viewer class. These logics will achieve that arbitrary separated data can be pasted just like in the old pasting functionality.
The corresponding messaging between kernel and gui is needed as well. A possibility would be using the already present stringmatrix as communication container and an extended event handler just like in the prompt handler.
Implementation:
A functionality as described by the analysis was implemented. The table editor can be called by entering edit CACHE() in the console. The console will wait until the user has applied or canceled the edit of the table.
Documentation:
The new functionality was added to the help files of edit.
Tests:
The tests were performed in production environment. Minor deviations were fixed. Functionality was implemented successfully.
Anonymous
Diff:
Diff:
Diff:
Diff:
Diff: