QML Message System Broken


Hi… this is news to me. Is there a new way of handling messages I am not yet aware of?
Thanks in advance if I’m still doing it “the old way”

Thoys is able to push via script, but the send functionality isn’t working in QML.

Again, I’m doing this as mentioned in the past when the functionality to send messages to and from the QML window was introduced. It just “stopped” working today. All latest builds Interface/Sandbox

cc: @Jherico


Sorry, I was trying to fix something related to passing complex message types and it looks like I broke passing simple messages. Will have a fix up sometime today.

In the meantime, you can work around the problem by not passing simple types… i.e. if you want to pass the string "foo" then just pass ["foo"] and on the other side access it as message[0] instead of just message.


@AlphaVersionD there is a PR for a fix up here: https://github.com/highfidelity/hifi/pull/7541

Please test once it’s built and comment on the PR if it works.


@AlphaVersionD if you could test that and let us know I will approve it to be merged.


Getting the PR and testing now…

So the PR brings back the basic message sending / receiving. Thank you for that.

Something I noticed awhile ago and didn’t bother bringing it up, is when I use the toolbar icon to “toggle” visibility of the chat window, when it comes back, and you send a message it gets picked up and repeated many times. This is a multiple of the number of times you close / reopen “toggle” the QML window. Just counting the posts, it appears to be a square (2^2 = 4 then 3^2 = 9)

The close button on the window itself does not cause this (thanks @thoys) but we found out there is something going on with the toolbar toggle. I took @Jherico version of the fish tool to create this and combined the advice of adding the message mixer stuff.



I’ll try to take a look at what could be causing that issue.


When you show the window you’re subscribing to the message channel and also connecting to the QML window’s fromQml signal. However, when you hide the window you’re only unsubscribing from the message channel.

So every time you show the window and do this:

aquiWindowCenter.fromQml.connect(function(message){ ...

You’re ensuring you get more copies of the message sent from the QML. You should probably just connect to the fromQml signal when you create the window and ignore it during the show / hide operation.


Excellent! I’ll try to incorporate that shortly. Thanks.


Thanks for the recommendation @Jherico!!!