Help with table fields and cell editing

Viktoras Didziulis viktoras at ekoinf.net
Thu Oct 5 04:46:57 EDT 2006


Indeed, the only workaround is to uncheck and forget the "Table object". You
have to "roll your own" table. Gridlines, tab spacings are independent of
the table object anyway, so the visual impression will not change. I am also
adding a few scripts to my tables to capture keyboard events so it would
behave like an elementary table rather than an ordinary text field: 
 
#This prevents deletion of neighbour cell with delete 
on deleteKey 
if the selectedText is not empty then 
pass deleteKey 
else 
answer "Select text to delete" 
exit deleteKey 
end if 
end deleteKey 
 
#This prevents deletion of neighbour cell with backspace 
on backspaceKey 
if the selectedText is not empty then 
pass backspaceKey 
else 
answer "Select text to delete" 
exit backspaceKey 
end if 
end backspaceKey 
 
#These 2 prevent insertion of a new line into field with return/enter 
on returnInField 
exit returnInField 
end returnInField 
 
on enterInField 
exit enterInField 
end enterInField 
 
This may be the simpliest way to get a functional usable table. 
 
Best regards 
Viktoras 
-------Original Message------- 
 
From: Walton Sumner 
Date: 10/04/06 19:32:21 
To: use-revolution at lists.runrev.com 
Subject: Help with table fields and cell editing 
 
Help! 
 
I have a Rev 2.7.4 (build 291) PC interface for database editing that is in 
great shape except for one feature, directly editing a list of points. It 
seems to me that this should be a natural table field & cell editing task, 
but I can not see how to make it work. 
 
I have a group that contains a table field. The table field is not locked, 
the "Table object" setting is checked, the "cREVTable(celle" box is checked 
(cell editing), and the maximum editable column is set to 2. The tab stop is

less than half the width of the field, after subtracting the width of the 
vertical scroll bar. Problems persist with or without a horizontal scroll 
bar. 
 
The field has the following odd behaviors when it is populated with data: 
1. A mouseup event within a cell temporarily erases the data in the cell 
rather than selecting the data in the cell, even if I drag over the cell 
contents and manage to select them before releasing the mouse. If the 
mouseup occurs outside of the cell, the contents of the cell remain 
selected. Clicking in a cell also causes the erasing mouseup event. These 
are incorrect behaviors, IMO - the end user should be able to click or drag 
in the cell and insert or change one or a few digits. 
After clicking in a cell in the first column, clicking a different cell in 
the first column causes the first cell's contents to reappear (correct 
behavior) 
 
2. Clicking any cell in the second column erases the entire field's 
contents. The field does not recover when the cell is deselected. 
 
3. Clicking any cell in the second column selects the cell, but scrolls the 
field horizontally so that the cell's left edge abuts the left edge of the 
field, displaying the out-of-bounds third column and totally obscuring the 
first column. This is also incorrect behavior, IMO. The selected cell will 
accept new text, let's say "ABC", after turning off the keydown handler that

screened for digits. 
 
4. Tabbing from cell to cell has the same effect as clicking on a cell in 
the second column. 
 
5. After reloading the table contents from the database, clicking on any 
cell in the second column erases everything but restores the "ABC" that I 
entered in #3. 
 
So, I'm guessing that the table field is not updating its global descriptors

correctly, as reported in the archives from 2003 and 2004, but I can't see 
that anyone else has these problems currently. In fact, there are messages 
that talk about letting Rev handle tabs and arrows and the like, as if my 
current problems are not reproducible at all. Also, I thought until now that

Rev's field issues had been resolved. 
 
So is there some special combination of settings that makes the table work? 
Meanwhile, I'll be scripting a redundant interface to achieve point editing 
with tab keys and no mouseclicks. 
 
I can post to bugzilla if this the problem is not unique to me. 
 
Thanks in advance. 
 
Walton Sumner 
 
 
 
_______________________________________________ 
use-revolution mailing list 
use-revolution at lists.runrev.com 
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences: 
http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list