Procedure SetDiasHabiles(Prefijo: string; Form: TForm); var i: integer; begin for i := 0 to Form.ComponentCount -1 do if (Form.FindComponent(Prefijo) as TCheckBox).Checked = False then begin ShowMessage('No has seleccionado ningún día hábil para este Horario!'); Abort; end; end;
El resultado?, un bonito Access Violation:
--------------------------- Debugger Exception Notification --------------------------- Project TimerPunch.exe raised exception class EAccessViolation with message 'Access violation at address 005E37E5 in module 'TimerPunch.exe'. Read of address 00000000'. Process stopped. Use Step or Run to continue. --------------------------- OK Help ---------------------------