Thanks Klaus.
I may use this method rather than the overhead of clearing and setting
the whole pgData property.
Actually, the more I think about it, neither "method" should be needed.
This is a polygrid bug. If you set the pgColumsn to fewer column,
regardless of whether there is left over data in pgData, only the
columns in the currently set pgColumns should be seen.
On 8/24/2023 2:34 PM, Klaus major-k via use-livecode wrote:
Hi Paul,
Am 24.08.2023 um 20:30 schrieb Paul Dupuis via use-livecode
<[email protected]>:
Aha, I was setting pgColumns to the fewer columns and THEN pgData to the
smaller data set to match the columns
You need to clear the pgData (set to empty) first, then set the columns, then
set the new pgData.
Perhaps this is a documentation bug?
I had success by setting the dgColumns to EMPTY first and later to the new
"fewer" columns:
## Button "Fewer Columns"
on mouseUp pMouseButton
local tColA, tDataA
local tSum
lock screen
## !!
set the pgColumns of widget "myTable" to EMPTY
## !!
put "rowname" into tColA[1]["name"]
...
On 8/24/2023 2:26 PM, Paul Dupuis via use-livecode wrote:
Hi to any polygrid developers out there,
Please see bug https://quality.livecode.com/show_bug.cgi?id=24315
I have run into an issue with the latest polygrid (as of this post) where if
you set pgColumns to a new array that reduces the number of columns in the
grid, some old columns are not cleared, but instead are set to defaults (ie.
the names revert to col5, col6, etc. instead of being completely removed
Any thoughts to a work-around?
Best
Klaus
--
Klaus Major
https://www.major-k.de
https://www.major-k.de/bass
[email protected]
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode