Ver Mensaje Individual
  #1  
Antiguo 01-11-2011
Neeruu Neeruu is offline
Miembro
 
Registrado: oct 2007
Posts: 512
Reputación: 19
Neeruu Va por buen camino
Cool OverLoad con parametro Nil

Hola a todos!!!

Tengo la siguiente duda:

Tengo una Procedure :

Código Delphi [-]
Procedure AsignaExecute(MyBtnAction:TButtonAction; MyExecute:TNotifyEvent);

y lo invocaba de esta manera sin ningún problema (o sea compilaba y ejecutaba)

Código Delphi [-]
AsignaExecute(baSearch, Nil);

Ahora resulta que extendí ese procedimiento, y me quedo así:

Código Delphi [-]
  
Procedure AsignaExecute(MyBtnAction:TButtonAction; MyExecute:TNotifyEvent); overload;
Procedure AsignaExecute(MyBtnAction:TButtonAction; MyExecute:TNotifyEvent;
    bMostrar:Boolean); overload;

Hasta aca todo bien pero al momento de compilar me sale el error de:

Cita:
E2250: There is no overloaded version of '%s' that can be called with these arguments
Lo solucione, pero no se porque:
Código Delphi [-]
    
MyExecute := Nil;
AsignaExecute(baSearch, MyExecute, True);

Si alguien me podría explicar porque pasando 'Nil' no anda... y pasando el parámetro en una variable si!!!!


Saluda Atte Neeruu!!!
__________________
Saluda Atte Neeruu!!! :)
Responder Con Cita