sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #07592
[Bug 905435] [NEW] Match.onChange does not reflect Region.onChange method
Public bug reported:
Problem: The Match.onChange() method does not reflect the same behavior
as Region.onChange()
--
from sikuli.Sikuli import Match
def test(event):
print event
region = Match(100,100,200,200, 2.5)
region.onChange(test, 50)
region.observe()
####
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(test, 50)
TypeError: onChange(): 1st arg can't be coerced to int
---
Swapping, onChange arguments as follows:
region.onChange(50, test)
####
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(50, test)
TypeError: onChange(): 2nd arg can't be coerced to org.sikuli.script.SikuliEventObserver
--
However, the following code does work:
--
from sikuli.Sikuli import Region
def test(event):
print event
region = Region(100,100,200,200)
region.onChange(test, 50)
region.observe()
####
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
---
However this does not reflect the documentation which states the
minChangedSize as the 1st argument and the handler as the 2nd argument.
In reality it is flipped around.
http://sikuli.org/docx/region.html?highlight=onchange#Region.onChange
** Affects: sikuli
Importance: Undecided
Status: New
** Description changed:
Problem: The Match class onClass method does not reflect the same
behavior as Region.onMatch()
--
+ <code>
from sikuli.Sikuli import Match
def test(event):
- print event
+ print event
region = Match(100,100,200,200, 2.5)
region.onChange(test, 50)
region.observe()
+ </code>
---
Traceback (most recent call last):
- File "C:\work\killpy\test.py", line 7, in <module>
- region.onChange(test, 50)
+ File "C:\work\killpy\test.py", line 7, in <module>
+ region.onChange(test, 50)
TypeError: onChange(): 1st arg can't be coerced to int
-
Swapping, onChange arguments as follows:
region.onChange(50, test)
--
Traceback (most recent call last):
- File "C:\work\killpy\test.py", line 7, in <module>
- region.onChange(50, test)
+ File "C:\work\killpy\test.py", line 7, in <module>
+ region.onChange(50, test)
TypeError: onChange(): 2nd arg can't be coerced to org.sikuli.script.SikuliEventObserver
--
-
However, the following code does work:
--
from sikuli.Sikuli import Region
def test(event):
- print event
+ print event
region = Region(100,100,200,200)
region.onChange(test, 50)
region.observe()
--
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
-
- However this does not reflect the documentation which states the minChangedSize as the 1st argument and the handler as the 2nd argument. In reality it is flipped around.
+ However this does not reflect the documentation which states the
+ minChangedSize as the 1st argument and the handler as the 2nd argument.
+ In reality it is flipped around.
** Description changed:
Problem: The Match class onClass method does not reflect the same
behavior as Region.onMatch()
--
- <code>
+ [code]
from sikuli.Sikuli import Match
def test(event):
print event
region = Match(100,100,200,200, 2.5)
region.onChange(test, 50)
region.observe()
- </code>
+ [/code]
---
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(test, 50)
TypeError: onChange(): 1st arg can't be coerced to int
Swapping, onChange arguments as follows:
region.onChange(50, test)
--
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(50, test)
TypeError: onChange(): 2nd arg can't be coerced to org.sikuli.script.SikuliEventObserver
--
However, the following code does work:
--
from sikuli.Sikuli import Region
def test(event):
print event
region = Region(100,100,200,200)
region.onChange(test, 50)
region.observe()
--
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
However this does not reflect the documentation which states the
minChangedSize as the 1st argument and the handler as the 2nd argument.
In reality it is flipped around.
** Description changed:
Problem: The Match class onClass method does not reflect the same
behavior as Region.onMatch()
--
- [code]
from sikuli.Sikuli import Match
def test(event):
print event
region = Match(100,100,200,200, 2.5)
region.onChange(test, 50)
region.observe()
- [/code]
---
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(test, 50)
TypeError: onChange(): 1st arg can't be coerced to int
Swapping, onChange arguments as follows:
region.onChange(50, test)
--
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(50, test)
TypeError: onChange(): 2nd arg can't be coerced to org.sikuli.script.SikuliEventObserver
--
However, the following code does work:
--
from sikuli.Sikuli import Region
def test(event):
print event
region = Region(100,100,200,200)
region.onChange(test, 50)
region.observe()
--
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
However this does not reflect the documentation which states the
minChangedSize as the 1st argument and the handler as the 2nd argument.
In reality it is flipped around.
** Description changed:
- Problem: The Match class onClass method does not reflect the same
- behavior as Region.onMatch()
+ Problem: The Match.onChange() method does not reflect the same behavior
+ as Region.onChange()
--
from sikuli.Sikuli import Match
def test(event):
print event
region = Match(100,100,200,200, 2.5)
region.onChange(test, 50)
region.observe()
---
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(test, 50)
TypeError: onChange(): 1st arg can't be coerced to int
Swapping, onChange arguments as follows:
region.onChange(50, test)
--
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(50, test)
TypeError: onChange(): 2nd arg can't be coerced to org.sikuli.script.SikuliEventObserver
--
However, the following code does work:
--
from sikuli.Sikuli import Region
def test(event):
print event
region = Region(100,100,200,200)
region.onChange(test, 50)
region.observe()
--
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
However this does not reflect the documentation which states the
minChangedSize as the 1st argument and the handler as the 2nd argument.
In reality it is flipped around.
** Description changed:
Problem: The Match.onChange() method does not reflect the same behavior
as Region.onChange()
--
from sikuli.Sikuli import Match
def test(event):
print event
region = Match(100,100,200,200, 2.5)
region.onChange(test, 50)
region.observe()
- ---
+
+ ####
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(test, 50)
TypeError: onChange(): 1st arg can't be coerced to int
+ ---
Swapping, onChange arguments as follows:
region.onChange(50, test)
- --
+
+ ####
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(50, test)
TypeError: onChange(): 2nd arg can't be coerced to org.sikuli.script.SikuliEventObserver
--
However, the following code does work:
--
from sikuli.Sikuli import Region
def test(event):
print event
region = Region(100,100,200,200)
region.onChange(test, 50)
region.observe()
- --
+
+
+ ####
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
+ ---
However this does not reflect the documentation which states the
minChangedSize as the 1st argument and the handler as the 2nd argument.
In reality it is flipped around.
** Description changed:
Problem: The Match.onChange() method does not reflect the same behavior
as Region.onChange()
--
from sikuli.Sikuli import Match
def test(event):
print event
region = Match(100,100,200,200, 2.5)
region.onChange(test, 50)
region.observe()
####
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(test, 50)
TypeError: onChange(): 1st arg can't be coerced to int
---
Swapping, onChange arguments as follows:
region.onChange(50, test)
####
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(50, test)
TypeError: onChange(): 2nd arg can't be coerced to org.sikuli.script.SikuliEventObserver
--
However, the following code does work:
--
from sikuli.Sikuli import Region
def test(event):
print event
region = Region(100,100,200,200)
region.onChange(test, 50)
region.observe()
-
####
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
---
However this does not reflect the documentation which states the
minChangedSize as the 1st argument and the handler as the 2nd argument.
In reality it is flipped around.
+
+ http://sikuli.org/docx/region.html?highlight=onchange#Region.onChange
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/905435
Title:
Match.onChange does not reflect Region.onChange method
Status in Sikuli:
New
Bug description:
Problem: The Match.onChange() method does not reflect the same
behavior as Region.onChange()
--
from sikuli.Sikuli import Match
def test(event):
print event
region = Match(100,100,200,200, 2.5)
region.onChange(test, 50)
region.observe()
####
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(test, 50)
TypeError: onChange(): 1st arg can't be coerced to int
---
Swapping, onChange arguments as follows:
region.onChange(50, test)
####
Traceback (most recent call last):
File "C:\work\killpy\test.py", line 7, in <module>
region.onChange(50, test)
TypeError: onChange(): 2nd arg can't be coerced to org.sikuli.script.SikuliEventObserver
--
However, the following code does work:
--
from sikuli.Sikuli import Region
def test(event):
print event
region = Region(100,100,200,200)
region.onChange(test, 50)
region.observe()
####
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
ChangeEvent on Region[100,100 200x200]@Screen(0) E:Y, T:3.0 | 1 changes
---
However this does not reflect the documentation which states the
minChangedSize as the 1st argument and the handler as the 2nd
argument. In reality it is flipped around.
http://sikuli.org/docx/region.html?highlight=onchange#Region.onChange
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/905435/+subscriptions
Follow ups
-
[Bug 905435] Re: X-1.0rc3: Region.onChange(handler, Integer) should give an error, instead of silently ignoring the Integer
From: RaiMan, 2013-08-14
-
[Bug 905435] Re: X-1.0rc3: Region.onChange(handler, Integer) should give an error, instead of silently ignoring the Integer
From: JD, 2013-04-05
-
[Bug 905435] Re: X-1.0rc3: Region.onChange(handler, Integer) should give an error, instead of silently ignoring the Integer
From: RaiMan, 2013-02-21
-
[Bug 905435] Re: X-1.0rc3: Region.onChange(handler, Integer) should give an error, instead of silently ignoring the Integer
From: RS, 2013-02-14
-
[Bug 905435] Re: X-1.0rc3: Region.onChange(handler, Integer) should give an error, instead of silently ignoring the Integer
From: RaiMan, 2013-02-14
-
[Bug 905435] Re: X-1.0rc3: Region.onChange(handler, Integer) should give an error, instead of silently ignoring the Integer
From: RS, 2013-02-14
-
[Bug 905435] Re: X-1.0rc3: Region.onChange(handler, Integer) should give an error, instead of silently ignoring the Integer
From: RaiMan, 2012-11-02
-
[Bug 905435] Re: X-1.0rc3: Region.onChange(handler, Integer) should give an error, instead of silently ignoring the Integer
From: RaiMan, 2012-11-02
-
[Bug 905435] Re: Region.onChange(handler, Integer) should give an error, instead of silently ignoring the Integer
From: RaiMan, 2011-12-17
-
[Bug 905435] Re: Match.onChange does not reflect Region.onChange method
From: RaiMan, 2011-12-17
-
[Bug 905435] [NEW] Match.onChange does not reflect Region.onChange method
From: Josh, 2011-12-16
References