Table Field not updating correctly

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Table Field not updating correctly

Post by raugert » Tue Aug 28, 2018 9:57 pm

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
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: Table Field not updating correctly

Post by ClipArtGuy » Tue Aug 28, 2018 10:15 pm

I can confirm this behavior in Ubuntu 18.04 and Windows 10.

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Re: Table Field not updating correctly

Post by raugert » Tue Aug 28, 2018 10:25 pm

Thanks, I am using Mac OSX Sierra 10.12.6. I'm surprised no one noticed this before. :o
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Table Field not updating correctly

Post by bogs » Tue Aug 28, 2018 10:38 pm

raugert wrote:
Tue Aug 28, 2018 10:25 pm
I'm surprised no one noticed this before.
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 :?
Image

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: Table Field not updating correctly

Post by ClipArtGuy » Tue Aug 28, 2018 10:41 pm

I did a quick test to see if data entered programmatically had any similar bugs:

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
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.....

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Table Field not updating correctly

Post by bogs » Tue Aug 28, 2018 10:43 pm

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).
Image

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Table Field not updating correctly

Post by dunbarx » Tue Aug 28, 2018 10:57 pm

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
Last edited by dunbarx on Tue Aug 28, 2018 11:01 pm, edited 2 times in total.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Table Field not updating correctly

Post by bogs » Tue Aug 28, 2018 10:59 pm

I did find this bug report 18983, but aint sure if it is the same thing or not.

Ah well, time for supper!
Image

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Re: Table Field not updating correctly

Post by raugert » Tue Aug 28, 2018 11:05 pm

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. :D Thanks for your feedback.

Glad I'm not losing it... :P

Richard
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: Table Field not updating correctly

Post by ClipArtGuy » Tue Aug 28, 2018 11:07 pm

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.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Table Field not updating correctly

Post by dunbarx » Tue Aug 28, 2018 11:16 pm

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:

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
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

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Table Field not updating correctly

Post by bogs » Wed Aug 29, 2018 11:02 am

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...
Image

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Table Field not updating correctly

Post by dunbarx » Wed Aug 29, 2018 10:16 pm

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:

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
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

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Table Field not updating correctly

Post by bogs » Wed Aug 29, 2018 10:47 pm

dunbarx wrote:
Wed Aug 29, 2018 10:16 pm
It seems that bug # 20494 addresses this. introduced in v.7.
Huh, 18983 and 20494 do seem to rather resemble each other don't they?
Image

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Table Field not updating correctly

Post by dunbarx » Wed Aug 29, 2018 11:32 pm

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”