Re: signals to 2 objects



walter tallent wrote:
[ ... ]
How can the board send the
signal to both the game and the app and make sure that
game gets it first?  Or is there another mechanism
altogether I should be using to do this?

First of all, a signal is sent to signify that "something happened",
generaly the order of signals handlers should be arbitrary for a good
and solid design (except the signal handlers installed by the
class ofcourse). Generaly, if this is important and you want to maintain
a workable design, if you think about it your app isn't really interested
in the "board" signal, your app is interested in the
"game-recieved-and-processed-board" signal.

Note though, that singnals are marshalled in a first-come-first-serve manner,
so in the game object constructor, which I assume creates its child board
object, the game object will connect to the correct signals before exiting
from its constructor, so technicly the app cant connect to board signals
before the game can.

Cheers,
                                 -Tristan







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]