say for example:

  type
     TmyClass = class
     published
        procedure Something (sender : Tobject);virtual;
    end;

var
  myClass  : TmyClass;

then somewhere

    AddMethodToQueue(@myclass.Something);


Is it possible within AddMethodToQueue, I can query the Run Time Type Info of the method passed in ?



procedure AddMethodToQueue(const TheEvent : TNotifyEvent);
var aMethodObjectname : String;
begin
    //I can already do this
     aMethodObjectName := TObject(TMethod(TheEvent).Data).ToString;

//how do I check the RTTI of TheEvent and get the name of the method i.e. 'Something'?
   //since it is published, it should be possible, right?

end;

Thanks in advance.

Dennis
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to