Hi,
I use the version 0.9.8.9.
When I try to remove a lineplot with the remove function
of the Plotsurface, an exception is thrown.
It is an invalid Cast exception because the function
RefreshZOrdering() is trying to cast an item of the
arraylist 'zPostions' to a double.....
-------------------------CODE-----------------------------------
private void RefreshZOrdering()
{
uniqueCounter_ = 0;
ordering_ = new SortedList();
for (int i = 0; i < zPositions_.Count; ++i)
{
double fraction = (double)(++uniqueCounter_) /
10000000.0f;
***************CAST PROBLEM*******************
ordering_.Add((double)zPositions_[i] + fraction, i);
********************************************************
}
}
--------------------------------------------------------------------
Kind regards and thank you for the wonderfull lib
Steven Cool
Logged In: NO
I had the same problem and looked into it. zPositions_ holds
Int32's. The compiler has to cast from object to Int32. It
can't cast from object to double when the underlying type is
Int32. Just change it like this:
int compilerIsDumbSoIHaveThisHack = (int)(zPositions_[i]);
ordering_.Add((double)compilerIsDumbSoIHaveThisHack +
fraction, i);