Polygrid columns not fully clearing when pgColumns is set

Klaus major-k klaus at major-k.de
Thu Aug 24 14:34:02 EDT 2023


Hi Paul,

> Am 24.08.2023 um 20:30 schrieb Paul Dupuis via use-livecode <use-livecode at lists.runrev.com>:
> 
> 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
klaus at major-k.de




More information about the use-livecode mailing list