sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #18970
Re: [Question #231495]: highlight (and other region methods?) not working with Region subclass
Question #231495 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/231495
Status: Open => Answered
RaiMan proposed the following answer:
Yes, this is a weird historical problem:
Region and Screen are classes defined on the Jython level as subclassing
the class Region on the Java level. So only the object creations on the
Jython level and hence the casting Region(some_other_region) create real
Jython Regions.
Region methods defined on the Java level (99% of them are), that create new Regions will return a Java level Region.
(I have this problem on the list and it will be solved with the new version 1.1)
So in your case the returned region will no longer be of type MyRegion,
when using such a method with a MyRegion object.
I did not try, to find the critical section in your code (pardon me ;-),
I leave this to you.
But if you want your feature and not only practice on subclassing:
The new version 1.0.0 has the requested features grow() (expand a region), intersection() and union() and now highlight() can be chained (returns the region)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.