Summary
open window1
add method "test" with parameter "ByRef txt As string"
method code:
txt = txt + "aa"
add Opened event for window
hit text:
var st as string = "hello"
print(st)
test(st)
run prog, crash
Fatal VM exception: System.InvalidCastException: Expected Ref but got String.
at Objo.VM.Value.ThrowInvalidCast(ObjoType expected)
at Objo.VM.Value.get_AsRef()
at Objo.VM.VM.Run(Int32 exitAtFp)
at Objo.VM.VM.InvokeMethod(ObjoClosure method, Value receiver, Value[] args,
Boolean allowWhileStopRequested) at Objo.StdLib.Desktop.ControlMethods.CallEventHandler(VM vm, ObjoInstance ev
entSource, Value handler, Value[] args) at Objo.StdLib.Desktop.ControlMethods.FireEvent(VM vm, ObjoInstance instance,
String eventName) at Objo.StdLib.Desktop.WindowMethods
Objo Studio Version
Operating System
Select the operating system(s) affected as tags for this post.
Steps To Reproduce
Expected Result
Actual Result
Screenshots, Logs, Or Sample Project