I have some tabs and inside each of them, a TFrame containing, among others, a TMemo. The idea is that, as sometimes the TMemo can be too small, when I double-click on it, another form opens and the TMemo is shown inside of it, returning to its place once I close the form.
I have some procedures attached to OnKeyPress and OnKeyDown events of the TMemo, that remain in the original unit.
Everything works well, but once I close the Form, if I run it from the command line, I get the message
GLib-GObject-CRITICAL **: g_object_get_data: assertion 'G_IS_OBJECT (object)' failed
and after doing it some other times, an empty window turns up and I have to kill the process.
This is the way I change the memo from one place to another (apparently the warning goes after finishing this procedure):
procedure TMarco.Memo1DblClick(Sender: TObject);
begin
With Memo1 do
begin
Parent:=Editor1;
Left:=3;
Top:=3;
Width:=Editor1.Width-6;
Height:=Editor1.Height-6;
end;
Editor1.ShowModal;
Memo1.Parent:=Button1.Parent;
With Memo1 do
begin
Left:=472;
Top:=69;
Width:=Parent.Width-478;
Height:=Parent.Height-75;
end;
end;
Editor1 is the Form, and since I don't know how to refer to the Frame, I do it as the parent of Button1, another Control inside it.
What is going wrong?