I’m working on a web version of my desktop application.
The last days I’m trying to get Invoke work in the web application but so far without any luck.
The invoke command is used in the constructor of a Class.
This is the code in Desktop.
Dim info As Introspection.TypeInfo
info = Introspection.GetType(Me)
Dim methods() As Introspection.MethodInfo
methods = info.GetMethods
For q As Integer = methods.LastIndex DownTo 0
Dim p As Introspection.MethodInfo = methods(q)
#If DebugBuild Then
DebugLog p.name
#EndIf
If p.Name = "Window" Or p.Name = "DesktopWindow" Then
Dim w As DesktopWindow = p.Invoke(Self)
ParentWindow = w
mParent = (ParentWindow <> Nil)
Exit For
End If
Next
Here w contains information about the Container Control where the Class is part of that Container Control.
This is the code in Web.
Dim info As Introspection.TypeInfo
info = Introspection.GetType(Me)
Dim methods() As Introspection.MethodInfo
methods = info.GetMethods
For q As Integer = methods.LastIndex DownTo 0
Dim p As Introspection.MethodInfo = methods(q)
#If DebugBuild Then
DebugLog p.name
#EndIf
If p.Name = "Page" Or p.Name = "WebPage" Then
Dim w As WebPage = p.Invoke(Self)
ParentWebPage = w
mParent = (ParentWebPage <> Nil)
Exit For
End If
Next
Here w is always Nil
.
Is this a known problem or is it a bug or ???
2 posts - 2 participants