The IntVar constructor takes a NativePtr as an argument.
How do I create an IntVar from Int?
The IntVar constructor takes a NativePtr as an argument.
How do I create an IntVar from Int?
You could try this:
memScoped {
val intVar = alloc<IntVar>()
intVar.value = 123
}
Check out value for more information