moai.FreeObject("menRecentSearches") doesn't frees its children (items)!?
Posted: Sun Apr 27, 2025 2:02 pm
I do this:
to remove a menu from the menubar, but it seems that FreeObject() doesn't automatically frees the items of the menu!?
Shouldn't it also remove all its children/items?
I have to do that to free also all of its item:
Code: Select all
moai.DoMethod("menu", "Remove", "menRecentSearches")
moai.FreeObject("menRecentSearches")
Shouldn't it also remove all its children/items?
I have to do that to free also all of its item:
Code: Select all
For Local i=1 To RecentSearchMax
If moai.HaveObject("itmRS"..i)
DebugPrint("have itmRS"..i)
moai.DoMethod("menRecentSearches", "Remove", "itmRS"..i)
moai.FreeObject("itmRS"..i)
Else
DebugPrint("dont have itmRS"..i)
EndIf
Next
moai.FreeObject("menRecentSearches")