Multiple Lines, Rectangles or pointRecorders

Hi guys,
I have been struggling a lot with some code that I know the solution is pretty simple.
I have a class Rectangle or pointRecorder…
I want to every time I drag the mouse create a new line…
in order to do this I create an array of pointRecorders ( I tried this with ofRect as well)
then I tried to create a sort of counter everytime I drag the mouse but the results that I was testing didnt work. it seems that my i++, keesp adding while themouse is dragged.

any suggestion?
thanks!