I am trying to come up with a method equivalent to desktop ContainerControl.TrueWindow :
dim w as webcontainer = self
while w.parent <> nil
system.debuglog(w.parent.name)
w = w.parent
wend
The code is in a button on a container control within two successive WebContainers, finally placed as an instance on a WebPage.
So the parent should be a container control. I get an error :
[quote]Type mismatch error. Expected WebContainer, but got class WebView.
w = w.parent[/quote]
There is no WebView whatsoever in the project. It looks very much like a bug, does it not ?
I don’t understand, this works fine :
system.debuglog(self.parent.name)
system.debuglog(self.parent.parent.name)
system.debuglog(self.parent.parent.parent.name)