test

progging - To wander about and beg; to seek food or other supplies by low arts; to seek for advantage by mean shift or tricks.
progging - Programmer slang for writing computer code.

mandag 21. januar 2013

Multiple TFrame's on a form

I got a run-time error in my application when I had added two instances of the same TFrame on the same form. The error message looked like this:
A component named MyFrame already exists

Fair enough, but the thing was that only one of the frames was called 'MyFrame'. The other one was called 'MyFrame2'.

Apparently, the problem is that one of the two frames on my form using the default name as it is in unit that declares the frame TMyFrame.

So, if you only uses one frame of type TMyFrame on the form, it is okay to call it MyFrame, but if you have two ore more, none of them can be called MyFrame.

Lesson learned!

Ingen kommentarer:

Legg inn en kommentar