The Great Apple
Apr 01, 2006, 03:42 PM
Firstly, as a disclaimer, I feel that the answer I'm looking for is probably staring me in the face... but I'm still looking for it.
I'm having trouble with a function. It wants to take an enumeration, but I want to iterate over the range of types, passing it an integer. Here is my code:
for i in range(YieldTypes.NUM_YIELD_TYPES):
plotYield = pPlot.getYield(i)
and here is my error:
ArgumentError
:
Python argument types in
CyPlot.getYield(CyPlot, int)
did not match C++ signature:
getYield(class CyPlot {lvalue}, enum YieldTypes)
Now I can't seem to figure out at the moment how to get it to pass the enumeration code for the yeild, rather than the actual number the code points to while keeping it generic enough to be able to handle additional yeildTypes.
Any ideas?
I'm having trouble with a function. It wants to take an enumeration, but I want to iterate over the range of types, passing it an integer. Here is my code:
for i in range(YieldTypes.NUM_YIELD_TYPES):
plotYield = pPlot.getYield(i)
and here is my error:
ArgumentError
:
Python argument types in
CyPlot.getYield(CyPlot, int)
did not match C++ signature:
getYield(class CyPlot {lvalue}, enum YieldTypes)
Now I can't seem to figure out at the moment how to get it to pass the enumeration code for the yeild, rather than the actual number the code points to while keeping it generic enough to be able to handle additional yeildTypes.
Any ideas?