Jump to content
rsutton

Form Error - OnClick using Include

Recommended Posts

Hi there guys alright I fixed my problem it was simple, I wthought it was a hard error, but honestly it was just my own mistake by not paying attention.

 

So let me explain what happened...

 

I had 3 files

 

File1 = Included files 2 and 3

 

File2 Had a OnClick Method for TLabel which called a procedure in File3

 

In file3 I first wrote

[scar] procedure nonyabuisness;

begin

writeln('nonyabuisnesslol'); // Kills Form

end;[/scar]

 

And kept on getting a type mismatch error. Now I have made MANY forms, and this was my first confusing error because everything seemed correct..

 

The fix after about an hour of looking at the code is that I FORGOT to put it like this...

[scar] procedure nonyabuisness(sender: TObject);

begin

writeln('nonyabuisnesslol'); // Kills Form

end;[/scar]

 

Needless to say after I posted my problem and solved it, I remade this post to explain to everyone, it does not matter how good you are or how many times you have done something.... If you get an error, make sure you look at your basics.

Edited by rsutton
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...