Calling back into Xojo from Go

Asked elsewhere & posted here by me for further discussion

Xojo would need to send the address of the callback in to GO
Go would then need some way to call that
Pretty sure that, once the types get sorted, that should be possible

EXCEPT, like in C or any other language, you have to be super careful about calling back IN to xojo as its frameworks arent thread safe or re-entrant
So there is VERY little you can safely do in that callback method in Xojo

  1. it has to be in a module as GLOBAL (basically so it never moves about in memory or gets unloaded)
  2. it cant ONLY set simple non-reference type variables to values (integers, doubles, singles, booleans) You shouldnt do anything with strings or arrays as internally they are reference types

@einhugur and @MonkeybreadSoftware can probably add to that list things that are & are not safe to do

Ah yes or a CLASS shared method could be used as a callback