On 27/08/2023 20:43, Paul Dupuis via use-livecode wrote:
I ran into an inconsistency with the Polygrid
...
I am not sure this is a BUG. It is certainly an inconsistency and changing it would break some current code. On the other hand, the Polygrid is part of the widget set for Xavvi/Livecode Create and the goal for that tool is to have things be super easy and super intuitive for beginners (non-code or low-code app building) so I think beginners would find thsi jarring.

So, is it a bug? What does the community think?

I'd say it's definitely not a bug.

It may be a "missing feature". There is an asymmetry, in that there are ways to

- extract one row

- delete one row

but only

- add multiple rows.

You could make a case for adding a feature to "add a single row". But I wouldn't bother,  because it's already so easy - see below.

You suggested converting by

      repeat for each key tKey in sColSubtotalArray
        put sColSubtotalArray[tKey] into tA[1][tKey]
      end repeat
     -- tA is now in the format that the addDataAfter property of the Polygrid requires.

The latest LC has the additional feauture of "automatic" sequences; i.e.

  put [ sColSubtotalArray ] into tA

So, in fact you would simply do

      put the numberOfRows    of widget "rwTableview" into N
      set the pgInternalPointer of widget "rwTableview" to N
      set the addDataAfter       of widget "rwTableview" to [ sColSubtotalArray]

Alex.



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to