request = CreateObject("roTextureRequest",imageUrl)
print request.GetId()
-> 121639868
print str(request.GetId())
-> "1.216399e+08 "
I've been attempting to use the texture manager and the roTextureRequest object has a GetId() method which is returning large values such as those.
I'd like to use the returned id as an array key.
Problem is that I can't cast the int to a proper string, like above, the requests only increment by 1, so the result will give the same key for each request. I cannot use the url as they can duplicate on some regions, so only one region would be drawn.
My best work around so far is to store the first request id that I create and subtract it from any furture request id that is created. Those values cast fine (0,1,2,3....) There is a problem if the id's during a certain session were to overflow/or get set to a lower value than my start id.
Does anyone have any suggestions of casting the id properly or if the GetId() values can/will reset at a certain point during a session.
Or maybe even an alternate workaround to the subtract original method that might not be effected by an index reset. Thought I might be able to convert it to hex or something, but ave not found methods to do that.
Any thoughts would be appreciated
Thanks