tags:

views:

10

answers:

0

Hi, I'll try to be as cleared as possible.

I've written a custom component herited from TEdit.

This component create a form (Form1) when I double-click on the TEdit. This form, when clicking on a button, creates another form (Form2) modally. This is working well. But, when I want to access a variable (Form1.variable1) inside Form2, I got an access violation.

On Form1, if I access the variable like: ShowMessage(variable1) it's working, but if I do: ShowMessage(Form1.variable1) it's not working. Same thing for Form2.

If I put all this code outside a component, it's working well. I have only the problem when using it in my component.

What did I do wrong?

Thanks