John Dogget
Messages postés384Date d'inscriptionvendredi 18 juin 2004StatutMembreDernière intervention 7 mai 2009
-
18 juil. 2004 à 17:43
cs_iceman2001
Messages postés9Date d'inscriptionvendredi 20 février 2004StatutMembreDernière intervention19 septembre 2008
-
17 août 2004 à 10:13
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
cs_iceman2001
Messages postés9Date d'inscriptionvendredi 20 février 2004StatutMembreDernière intervention19 septembre 2008 17 août 2004 à 10:13
Petite erreur dans l'unité Ufonctions.
Remplacez la fonctions "existedeja" par celle-ci
Function existe_deja : Boolean;
var
StrListe: TStringList;
i,j: integer;
infos, Titre, Support : string;
begin
StrListe:= TStringList.Create;
StrListe.LoadFromFile(Fichier_Liste);
For i:=0 to StrListe.Count -1 do
begin
Infos := StrListe[i];
Titre := trim(copy ( infos, pos ('[TITRE]', infos)+7, (pos('[GENRE]', infos) - pos ('[TITRE]', infos)+8) -15
)) ;
Support := trim(copy ( infos, pos ('[SUPPORT]', infos)+9, (pos('[TITRE]', infos) - pos ('[SUPPORT]', infos)+9)-18 )) ;
if (Support Usaisie.Form2.Combo_support.Text ) and ( Titre Usaisie.Form2.Ed_Titre.Text ) then
begin
Result := true
end;
end;
FreeandNil(StrListe);
end;
Elle gerait très mal les doublons. ca devrait etre corrigé maintenant.
John Dogget
Messages postés384Date d'inscriptionvendredi 18 juin 2004StatutMembreDernière intervention 7 mai 2009 18 juil. 2004 à 17:43
Salut.
C'est vraiment très bien fait. Je trouve l'interface un peu "flashy" mais ca n'empeche pas le programme de tourner correctement.
17 août 2004 à 10:13
Remplacez la fonctions "existedeja" par celle-ci
Function existe_deja : Boolean;
var
StrListe: TStringList;
i,j: integer;
infos, Titre, Support : string;
begin
StrListe:= TStringList.Create;
StrListe.LoadFromFile(Fichier_Liste);
For i:=0 to StrListe.Count -1 do
begin
Infos := StrListe[i];
Titre := trim(copy ( infos, pos ('[TITRE]', infos)+7, (pos('[GENRE]', infos) - pos ('[TITRE]', infos)+8) -15
)) ;
Support := trim(copy ( infos, pos ('[SUPPORT]', infos)+9, (pos('[TITRE]', infos) - pos ('[SUPPORT]', infos)+9)-18 )) ;
if (Support Usaisie.Form2.Combo_support.Text ) and ( Titre Usaisie.Form2.Ed_Titre.Text ) then
begin
Result := true
end;
end;
FreeandNil(StrListe);
end;
Elle gerait très mal les doublons. ca devrait etre corrigé maintenant.
18 juil. 2004 à 17:43
C'est vraiment très bien fait. Je trouve l'interface un peu "flashy" mais ca n'empeche pas le programme de tourner correctement.