Table getSelectedRow returns -1 if Table is not in focus

5 views
Skip to first unread message

shop.servic...@gmail.com

unread,
Jan 24, 2019, 10:22:43 AM1/24/19
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10 Pro
Simulator Latest
Device PC, Android, IOS

I have a com.codename1.ui.table.Table and a separate Button container with Add Row.
I ask the user if They want the insertion to be at current location of at end of table.
However when The form focus turns to the Dialog, getSelectedRow returns -1 as indicated in the Table.getSelectedRow  method.

Is this intended?
Should I be relying on an external int to keep track of the selected row?

Thoughts?

Regards.

Shai Almog

unread,
Jan 24, 2019, 10:32:12 PM1/24/19
to CodenameOne Discussions
That's intentional as selection in this case essentially means focus traversal. You can keep your own selection value which maps to your needs.
Reply all
Reply to author
Forward
0 new messages