Einzelnen Beitrag anzeigen

mr2

Registriert seit: 3. Mai 2003
140 Beiträge
 
Delphi 2006 Enterprise
 
#2

Re: Class Procedures + Interface

  Alt 26. Jan 2009, 20:51
so könnte es funktionieren:

Delphi-Quellcode:
  IMyInterface = interface(IInterface)
  ['{82DD5CD1-3A07-4810-9E3F-68B28D59E528}']
    function CheckString(const Value: AnsiString): Boolean;
  end;

  TMyClass = class(TInterfacedObject, IMyInterface)
    function MyCheckString(const Value: AnsiString): Boolean;
    class function CheckString(const Value: AnsiString): Boolean; virtual;
    function IMyInterface.CheckString = MyCheckString;
  end;
mr2
"... we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we don't know. But there are also unknown unknowns - the ones we don't know we don't know."
  Mit Zitat antworten Zitat