dunbarx wrote:I am in 6.7. If cell editing is enabled, tabbing indeed moves the selection into the next cell, but any editing that takes place occurs only within that newly selected cell. It does not append to the previous cell.; the tab character that separates those two cell stays intact. So there is some internal processing going on in that field, based on the properties that make it a table field in the first place, that determines how it acts.
I should have said starting from an empty table. Put the cursor in cell 1. Add a char. Tab to the next cell. Add a char. Tab to the next cell. Cursor is now in cell 3 but the two chars are concatenated in cell 1. If the contents of the field have previously included tabs to separate cells, the tabs are left intact and the cell edited cell content will still be separated from the previous cell by the tab. But there is no underlying way to create a tab to separate cell contents if the table content has not already been set by other means. It seems. Try appending a new cell at the end of your content. Or use the mouse to select a cell past the last occupied one.
dunbarx wrote:My question then is this: are there two ways that a table field "displays" selected text? One way being that if one enters a cell via the tab key (which hilites the text in the target cell), that does not mean that the selectedText (or selected-anything) property has been set to that hilited data. But if the data in that cell is selected under script control, as per that button handler, it does?
I think there are two ways that a table field interacts with content, one which traps tab and enter keys with cell editing enabled in order to navigate cells, but does not pass them, leading to the broken content insertion without a tab to separate the content items. The other, without cell editing enabled, is the raw display without navigation, which therefore does not trap tab keys, therefore replacing selected text with the tab content. The replacement therefore changes the selectedChunk, which apparently reads tab as a negative number of chars. Because of unicode in 7?
dunbarx wrote:I still think I am missing something, that what I just wrote is not possibly correct.
Craig
I think you have uncovered something strange and obscure with the table object properties. It's probably because the table options have always been so poor people have avoided using them, especially since datagrids were introduced, and therefore this arcane stuff was not brought into the light.