CellTextAt(LoopIdx,-1) = Nil

The code below returns a Nil:

aTextRow = LB.CellTextAt(Loop_Idx,-1)

But before displaying this, it goes to Paint event (as usual).

The documentation says:
Passing -1 as the row or column parameters will refer to the entire row or column.

Second .CellTextAt

Must I poll each and every Column (from 0 to ColCount-1) instead ?

MacBook Pro 13" m1
Sequoia 15.6
Xojo 2025r2

So what’s the value of your Loop_Idx?

0

Sorry, but:
aTextRow = LB.CellTextAt(Loop_Idx,1)

Does not produce any Nil…

That is my first move when I discovered the line of the crash, then I checked back the documentation (I read it before writing the line) to be sure I read correctly.

Of course, I do not get the Row contents (with 1 instead of -1).

Bug number 79709

Looks like -1 is the bug, William said.

1 Like

But where ?

  1. In the API 2 documentation ?
  2. In current Xojo (or in Xojo API 2) ?

That is the question.

[William Yu]

We intentionally don’t allow this special -1 value when retrieving CellText, though it’s supported when setting it. We should either clarify this behavior in the documentation or make -1 work for getting CellText as well.

Both, maybe?

Not sure if they will just update Documentation or make -1 work (as said by William on your ticket).

1 Like

Sorry Alberto, I did not read my bug report before answering (but after :frowning: ).

I will use a loop to get the Row contents, and try to stop talking when I see strange things (related to Xojo).

I’m sorry to read that.
Without your report, this problem will not been fixed for next release.

Thank you for your kind words.