Android Question warning #20 Table class

RB Smissaert

Well-Known Member
Licensed User
I am using the Table class in the designer, added to a panel (Add View, CustomView, Table)
I declare the class in Sub Globals():
Private TableX As Table
This causes a warning in the IDE:
View 'TableX' was added with the designer. You should not initialize it. (warning #20)
This is not actually causing any problems.
If I leave the declaration out I will get:
Undeclared variable 'tablex' is used before it was assigned any value.
How should this be done?



Licensed User
When you add a component in the Designer, you should use Tools/Generate Members to have a reference of it placed in your code.
Then simply use that reference (no Init) as if you declared it yourself.
Upvote 0


Licensed User
Without seeing your code it's impossible to geive a concrete advice.
You say that you added the Table in the Designer, so you must not initialize it in the code.
In the demo program Table1 is added in the Designer and Table2 is added in the code.

What Name did you give the Table in the Designer?
Otherwise post your project so we can see what exactly you have done.
Upvote 0