Xojo 2021R2.1/Win , tested on Firefox, Chrome, Edge.
Suppose there’s a WebButton with a menu that’s being initialized in the Opening event:
me.Menu.AddMenuItem(“initial”)
Then, at runtime, a method changes the Value of that menu:
Button1.Menu.MenuItemAt(0).Value = “updated”
What happens is that the Value is logically refreshed (the MenuSelected event gets the updated value), but not visually! The button keeps showing the initial menu item value!
I’ve added calls to UpdateBrowser immediatelly afterwards, no joy.
I’ve tried removing the menu item and re-inserting it, happens logically but there is no visual refresh.
And by the way, insertion of additional menu items after the Opening event doesn’t appear to be working either.
Why is this gravely important? It’s impossible to localize the app!
Am I doing something wrong?
Looks like a bug, could there be a JS black magic quick-fix/workaround?
From what I can see, this case has been marked as “fixed”, but it was not included in the 2021R3 release. The issue persists.
In the meantime, I’ve found a cumbersome workaround to localize, using Localized Constants and Session.LanguageCode set by a URL option at page load, but that doesn’t mean it doesn’t need fixing anymore. In this case, language change = webapp reload, and that complicates things unnecessarily in some scenarios.
So, what does “This case has been fixed and is waiting verification from our testing staff” effectively mean? That it’s going to be included in the next release, or that it can remain in that state for an indefinite amount of time?
Whenever an engineer checks in a fix for a bug report, they have to weigh whether or not the fix is safe for the current cycle. The more complicated the fix is and the closer we are to release make it less likely that it would be included in the current release cycle.
So unless a case was fixed as part of a feature branch, it should appear in the next prerelease cycle.