[1.0.1] Finder.find(): only finds one match --- use Finder.findAll() to find more than one --- docs fixed
Bug #1445940 reported by
RaiMan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Fix Committed
|
Critical
|
RaiMan |
Bug Description
---------- fixed 2015-04-19
the docs are not showing the API and behaviour with 1.1.0
the docs for version 1.1.0:
http://
-------
I am using Sikulix 1.1.0 (2015-01-
I try to implement the codes on example 2 of http://
f = Finder("stars.png")
img = "star.png"
f.find(img)
mm = []
while f.hasNext():
mm.
print f.hasNext()
f.destroy()
print len(mm)
for m in mm:
print m
The result is supposed to be 5 matches. However, I only get
1
M[30,32 23x23]@S(S(0)[0,0 1920x1080]) S:1.00 C:41,43 [0/0 msec]
Please help.
Thanks.
Changed in sikuli: | |
status: | New → Fix Committed |
importance: | Undecided → High |
assignee: | nobody → RaiMan (raimund-hocke) |
milestone: | none → 1.1.0 |
Changed in sikuli: | |
importance: | High → Critical |
summary: |
[1.0.1] Finder.find(): only finds one match --- use Finder.findAll() to - find more than one + find more than one --- docs fixed |
description: | updated |
To post a comment you must log in.
ok, checked again and looked into the code:
this is simply a doc-bug.
with version 1.1.0 I changed the behaviour and the API, to be consistent with the Region. find()/ findAll( ):
Finder.find() by intention only finds one match and then returns.
Finder.findAll()
does what you expect.
the example should look like this:
f = Finder("stars.png") append( f.next( ))
img = "star.png"
f.findAll(img)
mm = []
while f.hasNext():
mm.
f.destroy()
print len(mm)
for m in mm:
print m