Comment 1 for bug 1450805

Revision history for this message
RaiMan (raimund-hocke) wrote :

good point, since the modifiers in future (already available with type()) should be strings anyway.
So I just changed the API at the Java level from int to Integer, which now allows to use None at the script level.

BTW:
--- since that is usually the default behavior of an optional argument
... might be true for the Jython scripting level, but since the Region API is completely implemented at the Java level, this is not really true here (Java does not have keyword nor optional args yet.

--- since you have a wrapper anyway, this would have been your private solution ;-)

def myClickFun(region, image, modifier=None):
    # Do some things for stability
    region.click(image, modifier ? modifier : 0)