22r3 fails on API-1 additions to a new event

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

Check the super and make sure it’s not a DesktopPopupMenu

Are you using LastIndex or ListIndex for API-1?

From 2019r1.1 local docs I can’t find LastIndex for popupmenu.

Double checked - it’s just PopupMenu

LastIndex It is valid, but you may need to go back to a pre-API-2 IDE.

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.

LastIndex is now LastAddedRowIndex in API-2, no idea why it’s not showing in the API-1 docs. It definitely works.

Well, I don’t know, I guess this should work in 2018r4 then but doesn’t:

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