The generated PPtl record structure class includes five methods, as follows:
Instead of the techniques used in the defaultRows and setParameters scripts of the previous section, a script segment similar to the following can now be used to initialize an array of points:
| pointArray | pointArray := PPtl new. pointArray xAt: 1 put: 0; yAt: 1 put: 0; xAt: 2 put: 50; yAt: 2 put: 50;
xAt: 3 put: 90; yAt: 3 put: 25; xAt: 4 put: 120; yAt: 4 put: 125;
xAt: 5 put: 145; yAt: 5 put: 110; xAt: 6 put: 170; yAt: 6 put: 120; xAt: 7 put: 180;
yAt: 7 put: 105; xAt: 8 put: 200; yAt: 8 put: 130.
Now you are ready to access the drawGraph external C function and pass the pointArray you just created as a parameter.