[GAP Forum] When is an ImmediateMethod triggered?

Sebastian Gutsche gutsche at momo.math.rwth-aachen.de
Sun Dec 2 14:16:43 GMT 2012


Dear all,

I have discovered that an ImmediateMethod is only triggered once for 
every object, exactly when the filter given in the implementation of the 
ImmediateMethod becomes true for the object, even if the computation 
ends without an result (TryNextMethod without second choice). This makes 
sense! It is also implicitly stated in the documentation, but not 100% 
clear, so I wanted to ask if this is true.

Now, for some features, I need a possibility to trigger a method 
(without a return, or a partial immediate one which ends in 
TryNextMethod) at every time a filter is set to true for the object and 
the method is applicable. Is there a possibility to do this without 
installing the same partial immediate method with the filter which can 
become true eventually for every filter, so it will be triggered every 
time a filter comes true? I really would prefer a global solution, since 
I don't want to spam the method selection with a (metric) ton of 
ImmediateMethods. But if it is no problem to install many 
ImmediateMethods, I think I can life with that solution.

 From the solution a second question arises: If an ImmediateMethod is 
installed, and is applicable to an object directly, will it be triggered?

Best wishes,
Sebastian



More information about the Forum mailing list