← Back to team overview

sikuli-driver team mailing list archive

[Question #143532]: Location.getX() and getY() return type?

 

New question #143532 on Sikuli:
https://answers.launchpad.net/sikuli/+question/143532

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.getX()) + 100 
...
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://answers.launchpad.net/sikuli/+question/139814 , I think that something is wrong. 

Am I right, or I just don't know something about Python?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.