« MBS Xojo / Real Studi… | Home | xDev Magazine Issue 1… »

Call delegate on main thread

We just added a new feature to the plugin: CallDelegateOnMainThreadMBS

We call the delegate on the main thread later with passing a parameter. Our plugin supports various combinations of up to 2 parameters of type string, variant, boolean, double, integer and object. If you need more combinations, please contact us.

Here are a few example calls:

CallDelegateOnMainThreadMBS AddressOf testString, "Hello"
CallDelegateOnMainThreadMBS AddressOf testNumbers, 5, 6
CallDelegateOnMainThreadMBS AddressOf TestNoParameters
CallDelegateOnMainThreadMBS AddressOf Test, "4th call", 4

This allows us to call methods to update GUI directly from a thread :-)
And with the automatic type matching, you can simply use addressOf/weakAddressOf with your method and if the plugin has a matching method, the compiler will accept and build the plugin.
PS: I added this myself because feedback case 16504 is not implemented. The biggest plugin in space...
04 01 14 - 21:21