Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Enumerate
End Sub
Sub Enumerate
Dim c As myclass
c.Initialize
Dim r1, r2 As Reflector
r2.Target=c
r1.Target=r2.RunMethod("getClass")
Dim Fields() As Object = r1.RunMethod("getDeclaredFields")
For Each Field As Object In Fields
r1.Target=Field
Dim vname As String = r1.RunMethod("getName")
If vname.StartsWith("_v_") Then
Log(vname)
Log(r2.GetField(vname))
Dim getter As String = vname.Replace("_v_","_get")
Log(r2.RunMethod(getter)) '***** this line bombs*******
End If
Next
End Sub