I've just wasted a few minutes tracking down an exception. Silly me didn't realise that
B4XPages.GetPage returns a page instance
B4XPagesManager.GetPage returns a page instance
B4XPagesManager.GetTopPage returns a B4XPageInfo!
Perhaps GetTopPage should also return a page instance or be renamed GetTopPageInfo, or maybe both should be available.
Also B4XPagesManager.FindPIFromB4XPage seems a bit non-obvious, I was looking for its function but the title didn't help. Perhaps GetPageInfo would be a better match with GetPageInfoFromRoot.
B4XPages.GetPage returns a page instance
B4XPagesManager.GetPage returns a page instance
B4XPagesManager.GetTopPage returns a B4XPageInfo!
Perhaps GetTopPage should also return a page instance or be renamed GetTopPageInfo, or maybe both should be available.
Also B4XPagesManager.FindPIFromB4XPage seems a bit non-obvious, I was looking for its function but the title didn't help. Perhaps GetPageInfo would be a better match with GetPageInfoFromRoot.