Thread.AddUserInterfaceUpdate Question

Thread now has the AddUserInterfaceUpdate method. There’s two possible signatures:

Thread.AddUserInterfaceUpdate(data as Dictionary) 

Thread.AddUserInterfaceUpdate(ParamArray data as Pair)

But the resulting UserInterfaceUpdate event only has a Dictionary in its signature:

Thread.UserInterfaceUpdate(data() As Dictionary)

So if I pass a pair from AddUserInterfaceUpdate, what happens to it? Does it get turned into a dictionary? Does Xojo assume that th left value is the key and the right value the value? Seems presumptuous…

Yes. Did you know that Dictionary has a constructor that accepts a ParamArray of Pairs?
https://documentation.xojo.com/api/language/dictionary.html#dictionary-constructor(paramarray_entries_as_pair)

2 Likes

I did not know that. Never used it before.

Thank you.