CollisionHandlerEvent: pattern and event

Hi,
i not understand the patter of class of CollisionHandlerEvent .
i not understand as is generate the event when is called the metod add_in_pattern and similary.
i read that the string pattern is the name of event, I conclude that eg framework.define_key will have as the name the string pattern.
I could have some clarification on that?

the topic to which I refer to is on this page: panda3d.org/manual/index.php … n_Handlers
especially when he says this:
For each kind of event, the CollisionHandlerEvent will construct an event name out of the names of the from and into objects that were involved in the collision.

also one of my concerns is:
%fn the name of the “from” object’s node
fn I have to replace the name of the person concerned to the collision, for example

If you set the string “foo-%fn-bar” as the “in” pattern, then when a collision is detected from object “snarf” into object “blatt”, the event “foo-snarf-bar” will be generated.

%fn is replaced with the name of the “from” object, in this case “snarf”.

David