TaskList return error -1

Hi,'m following the tuto about Webapp and tested the next unssucesfully:
TaskList.Cell(TaskList.ListIndex, 0) = “x”
The debug list of error reports:
Attempted to acces cell -1,0 but the limit is 0,1.

Other event works such as defining a value in the 2nd column.
This above does not work while trying to define “X” in the first column.

*I havent sent DB yet since its my very first Xojo test
…anyone knows what;s missing ?

Are you sure you shouldn’t be using LASTindex instead of LISTindex? LISTindex is the row that is currently highlighted. LASTindex is the row that was just added.

What section of the Tutorial is this?

Thanks Tim,
that works ! :slight_smile:
Paul, I’m (dumbly) copying the youtube Webinar:
https://www.youtube.com/watch?v=g283Ei8tr3Y

  • see at 12:12 min,
    …where the author is using LISTIndex - but this LIST doesn’t work on my PC, while LAST… works.

So how come the List works in the Webinar, what’s the dif with my trial config ?

Xojo 2013 re. 3.3
Xubuntu 12.10 - Xfce 4.10

Youtube Webinar ref is:
Creating a Web Application using Xojo

The difference would be that he happened to have a row highlighted, while you apparently did not. It’s a subtle bug that bites many of us. One of those things that make you wonder, “What were they thinking?” Having similar properties with similar functions, and only one character different? It’s a gotcha. Enough so that I recognized it right away, I’ve been bitten so many times.

Well thanks again TIm - I’ll stick to the LastIndex that seem to work in both case :slight_smile:

You’d have to ask the designers of the listbox - perhaps Andrew Barry himself
Unfortunately this has been this way for a VERY VERY VERY long time & changing it would break a ton of code

Based on that tutorial, you need to be using ListIndex, not LastIndex. The code is specifically to put an “X” on the row that is selected in the ListBox. If you click the “Complete” button without selecting a row, you get the error you are seeing.

How to fix this is discussed at around 15:00m in the tutorial video.

You might also want to refer to the actual Web Tutorial document which has step-by-step instructions as well (Help->Tutorials->Web).

Hmm, well, since one would follow the vid. playing/pausing, one get trapped 3 min “before” reading the Solution Tip.
Yop, thanks Paul , I’m actually looking for to download all needed Doc…