On the main menu I have FILE -> Recent Files -> menuDB(10) where menuDB is a “control array” of 10 menu place holders
Under the EnableMenuItems I have code like this
x=ubound(MRU_DB_FILES) // array of 0 to x FolderItems, only care about 1st 10 or less
For i=0 To 9
If i<=x Then
menuDB(i).Visible=True
menuDB(i).Text=MRU_DB_Files(i).folderPath.DisplayName
Else
menuDB(i).Visible=False
menuDB(i).Text="?X" // added as a test
End If
Next i
This code works PERFECTLY on macOS, but under windows, while the VISIBLE line executes, the menu item STAYS visible
Is this a bug in Xojo? an issue with Windows? is there a workaround?
EDIT> I see this is “NOT SUPPORTED BY WINDOWS” … any ideas on a workaround?
“remove all but menuDB(0)”. There is no way to know how many more there are… I can’t use MRU_DB_FILE.UBOUND because it may or may not have had items removed. The issue is when the number of items in MRU_DB_FILE does not match the number of items in menuDB. Either items need to be appended to menuDB (not an issue)… .Or some unknown number need to be removed.
MRU_DB_FILE could lose items during the course of the program running (ie. the user decides to delete one or more files)