Ver Mensaje Individual
  #13  
Antiguo 09-02-2010
Avatar de jbautista
jbautista jbautista is offline
Miembro
 
Registrado: jul 2008
Posts: 43
Reputación: 0
jbautista Va por buen camino
Hola Roman de lo que sugeriste tengo unas dudas ya que intente aplicarlo y no pude :P

Esta parte no la tengo poner verdad? o si???

Cita:
Empezado por roman Ver Mensaje

Código Delphi [-]
destructor TComponent.Destroy;
begin
  Destroying;
  if FFreeNotifies <> nil then
  begin
    while Assigned(FFreeNotifies) and (FFreeNotifies.Count > 0) do
      TComponent(FFreeNotifies[FFreeNotifies.Count - 1]).Notification(Self, opRemove);
    FreeAndNil(FFreeNotifies);
  end;
  DestroyComponents;
  if FOwner <> nil then FOwner.RemoveComponent(Self);
  inherited Destroy;
end;

Y en esta no me reconoce el procedure TForm1.Notification me falta alguna declaración en el USES???

Cita:
Empezado por roman Ver Mensaje
Entonces, la parte que faltaría, es redefinir el método Notification de TForm1 para, ahí sí, poner en nil la variable:

Código Delphi [-]
procedure TForm1.Notification(AComponent: TComponent; Operation: TOperation);
begin
  inherited;

  if (AComponent = Form2) and (Operation = opRemove) then
    Form2 := nil;
end;

// Saludos

Gracias! Saludos.
Responder Con Cita