Dear All
I have written a playlist programme for my mp3 player in Lazarus 2.0.8. It opens an M3U file on the player and writes the content to a Memo
Memo1.Lines.LoadFromFile('PlayListStephen.m3u');
After which it closes the file. When the Memo window is updated with new content the content is saved to the file using a Save button. Then I press an Exit button to leave the programme.
The improvement I want to make is to make Exit call Save, save, then exit. Simple I thought. From within the Exit onClick event I simply type: “BitBtn5Click();” - see below.
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
BitBtn5Click();
Close;
end;
This should call the Save button
procedure TForm1.BitBtn5Click(Sender: TObject);
begin
Lots of code to do with saving the Memo1 content
end;
But no, this is not the way. On Compile I get this error message:
“Compile Project, Target: SimpleForms.exe: Exit code 1, Errors: 2, Hints: 1
simpleformsunit.pas(48,64) Hint: Parameter "Value" not used
simpleformsunit.pas(338,17) Error: Wrong number of parameters specified for call to "BitBtn5Click"
simpleformsunit.pas(176,18) Error: Found declaration: BitBtn5Click(TObject);”
According to lots of places, what I have done is correct.
Any help appreciated