noam-io/lemma-qt — pull request #1 by freemarmoset (2014-07-23 19:50:52+00:00)
Title: Host registration fixes

In addition to some minor cleanup of the project file, this prevents the Lemma from sending duplicate "hears" strings in the host registration message. The result of duplicate hears is that the host will close the connection when when it fires what it thinks is an orphaned (but is actually a duplicate) player.

See:
https://github.com/noam-io/host/blob/master/lib/noam_server/orchestra.rb#L39-45

1) There is probably better way to do this. Open to suggestions.
2) Is it a problem to have multiple message handlers for the same event in the first place? Example: 2 different QML files both listening to the same event but with different handlers.

file 1:

NoamLemmaHears{
topic: "sampleMessage"
onNewEvent:{
doSomethingSpecificToMeWith(value);
}
}

file 2:

NoamLemmaHears{
topic: "sampleMessage"
onNewEvent:{
doSomethingCompletelyDifferentAndLocalToMeWith(value);
}
}