Why does WebListBox.CellTextAT return variant?

Why does it return Variant?
When does it return something else then String?

image

My guess is that, because we can assign a String or a WebListboxCellRenderer, we get a Variant to handle both.
But as .CellTextAt reference to text is confusing as we only expect Text (String) from it.
I’m not even sure if a Cell with WebListboxCellRenderer we can get that back or only the String. Haven’t played with that.

For me, it returns (with a button in it) Nil.

This is a question for @Greg_O (maybe?) or @Ricardo_Cruz if already changed after Greg left Xojo.

It breaks some Code for me. The day is near, where i have shadowed / overloaded nearly evry Xojo Control to get values I can work with, without having lots of workarounds which I will never find later :crazy_face:

1 Like

Hmm, ok. There was something wrong. Now I get the CellRenderer. Then this makes more sense.
But it would be much nicer, if there would be another method, where the CellRenderer lives.
Its unexpected to get an object from a method named CellTextAt and it is not really nice to handle that.

2 Likes

I agree with you, can you open a Feature Request?

I’m sure there is already a bug or feature request for splitting the methods, in order to avoid returning a Variant.

Edit: Issue #73946

1 Like