Location.getX() and getY() return Python-float/Java-double (from java.awt.Point) - should return int
Sikuli X-1.0rc1
I met an issue with Location.getX() / getY on Mac OS X Snow Leopard - it seems that return type isn't int, and I can't pass it to a function requiring int without a type converion.
# this works:
tmpx = int(mylocation.
...
end = Location(tmpx,100)
# and this works:
tmpx = mylocation.x + 100
...
end = Location(tmpx,100)
# and this doesn't:
tmpx = mylocation.getX() + 100
...
end = Location(tmpx,100)
It throws error "1st arg can't be coerced to int"
According to documentation and Q&A https:/
Am I right, or I just don't know something about Python?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Roman Podolyan for more information if necessary.