Why is IHYHost.SendMessage deprecated?

Still sort-of new to Hydra, I’ve gone through demo apps and am building plugins and converting an application to be Hydra-fied when I suddenly started seeing the 'SendMessage' is Deprecated warning show up when compiled. I wondered why I hadn’t seen it when looking at the Non-Visual demo and discovered that warning was turned off in that project.

So now I’m wondering, as I’m starting out with doing a lot of Hydra plugins and whatnot where I was planning on using SendMessage to do some logging to the main application from plugins, if that’s what I should really be doing. I looked through the wiki but couldn’t find any discussion of why this is being deprecated or a suggestion of what to use instead.

I suppose I can write an Interface and send my own custom messages, but SendMessage is very convenient. I don’t want to get caught down the road having to change my code–I’d rather do it the “right” way from the beginning. Is using Interfaces to define my own messaging types the recommended way?

Using custom interfaces is the way to go for your custom messaging. SendMessage is a method that was there since old days when Hydra was Delphi only, and so it is not designed to be used in a cross platform environment, we couldn’t just remove it because it could break existing code, but for new (and especially cross platform) code you need to create your own interface and use it for messaging.

Thank you for the reply. That’s good to know and I’ll adjust my approach.

And I might add a note on the wiki if you don’t mind.

My all means, please do. We appreciate any and all wiki contributions.