Table Field not updating correctly
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Table Field not updating correctly
The default "Table Field" is not updating correctly. I can correctly enter text into a few fields at first, but then it randomly enters the text into another cell. Here's a link to a video to demonstate:
https://youtu.be/MDyXY7ColGY
It seems pretty basic but it's got me stumped... I'm using Livecode Indy 9.0.0
thanks for any help,
Richard
https://youtu.be/MDyXY7ColGY
It seems pretty basic but it's got me stumped... I'm using Livecode Indy 9.0.0
thanks for any help,
Richard
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Re: Table Field not updating correctly
I can confirm this behavior in Ubuntu 18.04 and Windows 10.
Re: Table Field not updating correctly
Thanks, I am using Mac OSX Sierra 10.12.6. I'm surprised no one noticed this before.
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
Re: Table Field not updating correctly
That is pretty bizarre, does it only happen when your directly entering text in the cells, or does it happen when your using code to enter it as well?
If it only happens when you enter text manually, if it took 7 times I can see it being overlooked possibly, but I'd still file a bug report if there isn't one already.
If it happens no matter how it is entered, then it would indeed be puzzling that it was over looked.
*Edit - just verified it also happens in 8.1.4 on 'nix
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Re: Table Field not updating correctly
I did a quick test to see if data entered programmatically had any similar bugs:
This seems to enter the expected data every time. Once the table has been populated, the bug seems to disappear and cells can be edited without incident.....
Code: Select all
put empty into fld 1
repeat with x = 1 to 100
put x & tab after fld 1
add 1 to tCount
if tCount = 5 then
put CR after fld 1
put 0 into tCount
end if
end repeat
Re: Table Field not updating correctly
Well, that is good to know.
BTW, just confirmed the same issue in 7.1.4 on 'nix, so it goes back a ways eh.
*Edit - doesn't seem to be happening in 6.5.2 though, which is the vers. I use 2nd most (Mc 2.6 is the top bill in my fold).
BTW, just confirmed the same issue in 7.1.4 on 'nix, so it goes back a ways eh.
*Edit - doesn't seem to be happening in 6.5.2 though, which is the vers. I use 2nd most (Mc 2.6 is the top bill in my fold).
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Table Field not updating correctly
Confirmed here in v 8.1.9 on Mac OS 10.13
This also confirms that after entering data from a handler, the table field is perfectly stable.
A workaround, if one can call it that, is to simply put empty into a new table field. That is enough to settle it down, and then manual entry works fine.
Too bad the templateField does not include an embedded handler. Of course, one can trap "newField" in a plug-in, but I think this should be fixed by someone in Europe.
Craig Newman
This also confirms that after entering data from a handler, the table field is perfectly stable.
A workaround, if one can call it that, is to simply put empty into a new table field. That is enough to settle it down, and then manual entry works fine.
Too bad the templateField does not include an embedded handler. Of course, one can trap "newField" in a plug-in, but I think this should be fixed by someone in Europe.
Craig Newman
Last edited by dunbarx on Tue Aug 28, 2018 11:01 pm, edited 2 times in total.
Re: Table Field not updating correctly
I did find this bug report 18983, but aint sure if it is the same thing or not.
Ah well, time for supper!
Ah well, time for supper!
Re: Table Field not updating correctly
Thank-you all for your input. This all started when I thought I would use a simple table instead of a Datagrid to enter some data into 5 columns. The amount of rows is determined by what the user needs. I suppose I could populate 100 rows for now, or go back to using a Datagrid. Thanks for your feedback.
Glad I'm not losing it...
Richard
Glad I'm not losing it...
Richard
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Re: Table Field not updating correctly
C̶r̶a̶i̶g̶'̶s̶ ̶s̶o̶l̶u̶t̶i̶o̶n̶ ̶o̶f̶ ̶p̶u̶t̶t̶i̶n̶g̶ ̶e̶m̶p̶t̶y̶ ̶i̶n̶t̶o̶ ̶t̶h̶e̶ ̶t̶a̶b̶l̶e̶ ̶f̶i̶e̶l̶d̶ ̶b̶e̶f̶o̶r̶e̶ ̶e̶n̶t̶e̶r̶i̶n̶g̶ ̶t̶h̶e̶ ̶d̶a̶t̶a̶ ̶m̶a̶n̶u̶a̶l̶l̶y̶ ̶s̶e̶e̶m̶s̶ ̶t̶o̶ ̶w̶o̶r̶k̶.̶
Last edited by ClipArtGuy on Tue Aug 28, 2018 11:18 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Table Field not updating correctly
Well, you just cannot test too much.
I now find that after programmatically putting empty into a table field the problem comes up anyway. This for both a brand new field and one that has been populated and emptied.
And I like table fields. Cannot imagine how this slipped by. I have used them a lot for many years.
If one populates a certain number of lines and "cells", it seems that "region" becomes stable. BUT ONLY THAT REGION. In other words, one cannot just put "" into the whole field, one must put "" into every cell that might ever be in play. So a variant of my earlier, now useless suggestion, is:
It now seems to be stable with the extent of the above handler, a 5x5 area at the upper left of the field. Outside that extent, the problem appears again. The cells seem to need massaging.
EDIT:
And if anyone was wondering, one cannot simply put "" into the farthest reaches of the table field. Each and every "cell" has explicitly to be set. So the idea of running a plug-in might use 1,000,000 as the indexes in the above handler, and then the issue will likely not come up
Craig
I now find that after programmatically putting empty into a table field the problem comes up anyway. This for both a brand new field and one that has been populated and emptied.
And I like table fields. Cannot imagine how this slipped by. I have used them a lot for many years.
If one populates a certain number of lines and "cells", it seems that "region" becomes stable. BUT ONLY THAT REGION. In other words, one cannot just put "" into the whole field, one must put "" into every cell that might ever be in play. So a variant of my earlier, now useless suggestion, is:
Code: Select all
on mouseup
set the itemDel to tab
put empty into fld 1
repeat with x = 1 to 5
repeat with u = 1 to 5
put "" into item u of line x of fld 1
end repeat
end repeat
end mouseup
EDIT:
And if anyone was wondering, one cannot simply put "" into the farthest reaches of the table field. Each and every "cell" has explicitly to be set. So the idea of running a plug-in might use 1,000,000 as the indexes in the above handler, and then the issue will likely not come up
Craig
Re: Table Field not updating correctly
Wow. I am curious ( and will be checking this later ) about what would happen if you take a stack with a table field created in 6.5 ( I'll tested it again earlier, I still couldn't reproduce the issue ) and move it forward, would it have the issue or no? So many possibilities...
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Table Field not updating correctly
It seems that bug # 20494 addresses this. introduced in v.7.
That it has not been fixed in so long is a bit distressing. The workaround:
seems OK, though.
Interestingly, the above handler massages (a new native LC keyword, apparently) the "cells" in a variable, which then fill the "cells" in the actual field object, and that field is perfectly happy.
Anyone else find this odd? In one sense, I can imagine that the field cells can be massaged individually. But it is a stretch for me to think that one can create a variable and do the same thing there, and the target field seems to accept it. In other words, I had felt that actually loading something into the field itself made that field less cranky. Variables are rarely so.
Craig
That it has not been fixed in so long is a bit distressing. The workaround:
Code: Select all
on mouseUp
set the itemDel to tab
repeat with x = 1 to 200
repeat with u = 1 to 200
put "" into item u of line x of temp
end repeat
end repeat
put temp into fld "yourTableField"
end mouseUp
Interestingly, the above handler massages (a new native LC keyword, apparently) the "cells" in a variable, which then fill the "cells" in the actual field object, and that field is perfectly happy.
Anyone else find this odd? In one sense, I can imagine that the field cells can be massaged individually. But it is a stretch for me to think that one can create a variable and do the same thing there, and the target field seems to accept it. In other words, I had felt that actually loading something into the field itself made that field less cranky. Variables are rarely so.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Table Field not updating correctly
Bogs.
They are similar.
But what do you think about cranky table fields? That you can coax them to behave, even outside of themselves, in a pre-warmed variable?
Craig
They are similar.
But what do you think about cranky table fields? That you can coax them to behave, even outside of themselves, in a pre-warmed variable?
Craig