why are you using those????
Are You about usage of ptcGraph instead of other tools?
No, I'm talking about the contructor Init(). I haven't seen that since my good ol' Borland Pascal years.
You do a SetLength on that Array.
After that you do a for loop with 1 to count.
But... array of x is always from index 0 !!!
So you need to do 0 to count - 1 (or access object[I - 1] instead of object[ I ] )
I tried to do that by replacing 47th line in UMenu on this one (i'm not sure what i understand this part of Your answer correctly), but it still fails with SIGSEGV:
for I := 0 to EntryCount do
You can't go to EntryCount. If you use Array of X you end up with an array [0..EntryCount - 1] !!
So you can't loop to EntryCount but you need to loop to EntryCount - 1.
But you then also need to make sure you fill those correctly.
You could go the 'dirty' way TRon already mentioned and do SetLength ( EntryCount + 1).
But that will give you Array[ 0 .. EntryCount ] and then you have a 0 entry which you don't use.
For testing this is fine but it's best you learn how to use dynamic arrays and you need to know they start on 0 up to (and NOT including) the count you gave.
SetLength(Count) reserves Count elements.
That's [0 .. Count - 1] (you see that?)
Doing SetLength(Count + 1) will reserve Count + 1 elements.
And then you have [0 .. Count ] (and you can use that [ Count ] but have a [ 0 ] which you don't use.
That's how dynamic arrays work