New listbox methods

Hi All,

I have just update to Xojo 2021r3 and have discovered that my syntax for adding items to listboxes has changed. I am currently using the code below:

sourcesLB.Cell(sourcesLB.LastIndex, 1) = str(dropFolder.Item(i).CreationDateMBS)

How do I now get the same code to work in the latest version?

Thanks,
Roger

LastIndex is deprecated since 2019r2. Use LastAddedRowIndex.

Hi Peter,

I have also noticed that “Cell” is no longer an allowed option. What would I use in place of that?

Roger

Cell is deprecated as well. CellValueAt should be used.

I keep getting the message: Type “DesktopListBox” has no member name “CellValueAt”.

ListBox.CellValueAt

No, it’s now CellTextAt.

1 Like

API 1 before 2019r2: https://documentation.xojo.com/api/deprecated/listbox.html.Cell
API 1: ListBox (deprecated) — Xojo documentation
API 2: https://documentation.xojo.com/api/user_interface/desktop/desktoplistbox.html.CellTextAt

1 Like

Peter and Beatrix,

Thanks so much for your assistance. I have everything working correctly now.

Roger

API2 makes everything so much easier. :frowning:

2 Likes

Renaming stuff is so silly. I could fix the deprecations. But that so much functions and properties have gone away is just terrible.

1 Like

i missing consequent all arguments and return types in the method name 


Yup. 7 replies from people familiar with Xojo, before the OP learns how to make ‘what used to work’, work again. With no extra benefit for the work.

Changing all the names has had the exact opposite effect that Xojo intended.
More complex terminology for newbies, and a trip hazard for existing customers.

7 Likes

I think 95% of the users agree that the decision to change the names was not the best idea and they have already driven away many users because of it. And for sure are not attracting more newcomers because of the new (odd) names.

But I don’t think there is any point in mentioning this again and again. Xojo inc is not interested it going back. So we will have to learn to live with it and move on. Simple as that


1 Like

Confusion complete, don’t upgrade!!!

You can’t. Many bugs and OS’s dependencies solved in newer releases. For example, the new M1 CPU support. At some point, if you don’t upgrade, you will get stuck. But if you prefer, wait until the first 2022 stable release, because they still have few conversion bugs and enhancements to be done, like some people ending with empty labels after conversion (the conversion must do a better job to conserve the content).

Roger:
autocomplete usually gives the new syntax when you tab at the end of YOUR GOOD OLD TERMINOLOGY


So, most of the time you will not have to ask here and wait until a (good) answer comes.

Of course, if your search fail, ask here ! :grinning: