Tim_Jones
(Tim Jones)
October 13, 2022, 12:17pm
1
I have an API-1 project that compiles fine if I don’t add any “new” API-1 calls:
Existing call in a different popupmenu’s Open event:
Me.RowTag(Me.LastIndex) = SomeValue
Works, but adding a new Open event to a new popupmenu in 22r3 results in:
ccBackupSettings.pmJobType.Open, line 2
Type "PopupMenu" has no member named "LastIndex"
Me.RowTag(Me.LastIndex) = JOBTYPE.FULL
So far, I’m only seeing this related to PopupMenu objects.
xojoinc/xojo#70363
Greg_O
(Greg O)
October 13, 2022, 4:33pm
2
Check the super and make sure it’s not a DesktopPopupMenu
AlbertoD
(AlbertoD)
October 13, 2022, 5:10pm
3
Are you using LastIndex or ListIndex for API-1?
From 2019r1.1 local docs I can’t find LastIndex for popupmenu.
Tim_Jones
(Tim Jones)
October 13, 2022, 7:59pm
4
Double checked - it’s just PopupMenu
LastIndex It is valid, but you may need to go back to a pre-API-2 IDE.
AlbertoD
(AlbertoD)
October 13, 2022, 8:08pm
5
2019r1.1 is pre-API-2. I can’t find popupmenu.lastindex in the docs and I can’t type/autocomplete me.lastindex in code.
Anyway, opened Xojo 2018r4 and the local language reference is:
no LastIndex for popupmenu that I can find.
Tim_Jones
(Tim Jones)
October 13, 2022, 8:17pm
6
LastIndex is now LastAddedRowIndex in API-2, no idea why it’s not showing in the API-1 docs. It definitely works.
AlbertoD
(AlbertoD)
October 13, 2022, 8:25pm
7
Well, I don’t know, I guess this should work in 2018r4 then but doesn’t:
Tim_Jones
(Tim Jones)
October 13, 2022, 8:26pm
8
Closed - I confused my use of .LastIndex in the ListBox with the PopupMenu.
… because the search results only show the exact line of code so you can’t determine context from the search results at a glance. Another reason for 51310 to be implemented.
1 Like