🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.delphi
Article #334870

Class Helpers

#334870
From: m
Date: Sun, 22 Jan 2012 12:22
35 lines
1362 bytes
TMyClassHelper = class helper for TStringList
public
   function Add(const S: string): Integer;
end;

function TMyClassHelper.Add(const S: string): Integer;
begin
   Showmessage('dodano string do listy');
   ????????
   A tutaj powinien sie wywołać
   result := TStringList.add(S);

end;




Czy da sie za pomocą Class Helpers  zrobić aby
wykonał sie mój kod a następnie wykonała się metoda z klasy dla której 
jest tworzony Helpers  ?

var
   ob: TMyClassHelper;
begin
   ob:= TMyClassHelper.create;
   ob.add('test 1');
   ob.add('test 2');
   ob.add('test 3');

   showmessage(ob.text);
end;


M
Technical Details
Message-ID: <jfgv2t$dd8$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: m <m@m.pl>
Newsgroups: pl.comp.lang.delphi
Subject: Class Helpers
Date: Sun, 22 Jan 2012 13:22:57 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 35
Message-ID: <jfgv2t$dd8$1@inews.gazeta.pl>
NNTP-Posting-Host: host-89-228-70-141.olsztyn.mm.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1327234973 13736 89.228.70.141 (22 Jan 2012 12:22:53 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Sun, 22 Jan 2012 12:22:53 +0000 (UTC)
X-User: mariuszekpl003
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit