Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array Question
Message
De
12/10/2000 10:50:14
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Array Question
Divers
Thread ID:
00428486
Message ID:
00428486
Vues:
45
I have the following method defined within a class that will attach files to an email object. The method recieves as a parameter either a path or a path and a filename. If it is the path only, I use ADIR() to create an array of the files in said path and cycle through the array attaching all files in that subdirectory. Here is where my question comes in. When the method is called again with a second directory to attach, the varible temp (array that is defined within the ADIR() is not found. I attempted to DIMENSION my temp array before the ADIR() but that leaves me in the same situation. Working on the first call but the second, I have an array filled with logical false like the ADIR() was never executed. When stepping through the line is executed, but the array is not filled with info. Any suggestions are MORE THAN WELCOME. Thank you in advance...


Mike


LPARAMETER pcFile
IF right( pcfile, 1 ) = '\'
ADIR( latemp , pcfile + '*.*' )
lntotfilestoattach = ALEN( latemp, 1 )
counter = 1
for i = 1 to lntotfilestoattach
lcfilename = latemp[counter,1]
lcattachfile = pcfile + lcfilename
oAttachment = ;
this.oOutlookEmailMessage.attachments.add(lcattachfile)
counter = counter + 1
loop
endfor
else

IF FILE(pcFile)
oAttachment = ;
this.oOutlookEmailMessage.attachments.add(pcfile)
ELSE
MESSAGEBOX("File: " + pcfile + "not found")
EndIf

ENDIF
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform