I'll try to answer, from what I understand in the question... I guess you're talking about walktut ?
Anyway...
In the application (app.cpp) you can see that when an entity is created in CreatePlayer(),
a behaviour is set for it (player_behave) and a set of property classes are attached to the entity.
In the behaviour code (behaviour.cpp), it is said that when 'player_behave' named behaviour is requested,
the BehaviourPlayer class should be used.
Now, this class will receive messages (that is, its SendMessage() member will be called)
depending on the property classes the entity has.
For example, the entity was attached 'pctools.inventory' propclass, so its behaviour will receive all
messages that this propclass sends, namely pcinventory_addchild and pcinventory_removechild upon
addition and removal of inventory elements (other entities).
Each time a propclass sends a message to the player's entity behaviour, BehaviourPlayer::SendMessage()
is called, with a "message ID" (so one can distinguish what message was sent), and possibly a parameter
block, which in case of an inventory message holds the entity which was added or removed.
I hope this clears things up a bit.
Also note that this is with the "old" messaging system, with the newer one one can just subscribe to message,
there's no separate class for behaviour, if I understood it well
