AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Optionale Parameter

Ein Thema von DerKapitalist · begonnen am 30. Dez 2002 · letzter Beitrag vom 3. Dez 2009
 
Borschti

Registriert seit: 1. Nov 2007
Ort: Marburg Lahn
235 Beiträge
 
Delphi 2007 Professional
 
#16

Re: Optionale Parameter

  Alt 2. Dez 2009, 16:00
Hallo,

sorry das ich den alten Thread wieder ausgrabe aber mein Problem bezieht sich auf das oben genannte Overload, sprich überladen von Methoden.

Ich habe es so versucht:
Delphi-Quellcode:
procedure TOutlookPro.SendEmail(body : String; slAttPaths : TStringlist); overload;
var
  outlookApp : TOutlookApplication;
  mailItem : Variant;
  i : Integer;
begin
  outlookApp := TOutlookApplication.Create(Self);

  mailItem := OutlookApp.CreateItem(olMailItem);
  mailItem.Recipients.Add('alexander.bosshammer@bestserv.de');
  mailItem.Subject := 'Supportanfrage bsMIO';
  mailItem.Body := body;

  for i := 0 to slAttPaths.Count do
    begin
      mailItem.Attachments.Add(slAttPaths[i]);
    end;
    
  mailItem.Send;
end;

procedure TOutlookPro.SendEmail(body : String); overload;
var
  outlookApp : TOutlookApplication;
  mailItem : Variant;
begin
  outlookApp := TOutlookApplication.Create(Self);

  mailItem := OutlookApp.CreateItem(olMailItem);
  mailItem.Recipients.Add('alexander.bosshammer@bestserv.de');
  mailItem.Subject := 'Supportanfrage bsMIO';
  mailItem.Body := body;
  mailItem.Send;
end;
Ich bekomme aber jetzt die Meldung: E1030 Ungültige Compileranweisung: 'OVERLOAD'
Woran liegt das und wie bekomme ich die Meldung weg?

VG Alex
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:59 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz