Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HtmlWindow.OnOpeningURL > REDIRECT #1068
Operating system: any
Description of the problem:
in wxPython 3 we used the following code to redirect image links:
def OnOpeningURL(self, htmlUrlType, url): if ( htmlUrlType == HTML_URL_IMAGE and (self.basePath is not None) and not url.startswith(self.basePath) ): return self.basePath + "/" + url else: return HTML_OPEN
wxPython 4 now raises
From reading the docs OnOpeningURL has a fourth parameter redirect which is a Pointer to String variable that must be filled with an URL. How do i use this? I tried
redirect = self.basePath + "/" + url return HTML_REDIRECT else: return HTML_OPEN
but with no success.
How is the correct way of handling the redirect in wxPython 4?
referenced this issue
Nov 1, 2018
I've tested again with 4.0.4, but still no success.
The migration guide for OnOpeningURL says
If i do that, it raises a TypeError
From the documentation for HtmlWindow.OnOpeningURL: