On May 8, 2008, at 04:19, wayne forrest wrote:
> Ok that worked by I hit a "BRICK WALL" :-( ;
>
> This is not related to ICS but the way that the Mail-Module Works.
>
> Here is my Problem I am having.
>
> (1'st Email)
> (Trigger to Send Email)------>Class Fucntion to Send Email.
> Event Mail Sent -->Delete
> Temp
> Files
>
> (2'nd Email)
> (Trigger to Send Email)------>Class Fucntion to Send Email.
> Event Mail Sent -->Delete
> Temp
> Files
>
> My problem is that the File List (TStrings) is LOST or not initialized
> since
> it is not STATIC;
>
> It seems to me to solve the PRoblem I will have to not use CLASS
> Functions;
>
> Is there any other way; Like a STATIC Variable in Delphi 7;
>
> I tried the {J+} const aFileList : TStrings = nil; {J-} but it did not
> WORK;
A private, static variable is very easy in Delphi: just define it in
the 'Vars' part of the 'Implementation' section of the unit, and
initialize it in the 'Initialization' section. Check the help file for
more information.
If you are going to use a static method, then I suggest you create a
static variable (singleton) representing the file list, and send a
reference of it to the SendMail() method. Otherwise, it may be cleaner
to just create an instance of your mail module which contains it's own
list of files as a private member.
dZ
--
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be