Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Amembers
Message
De
03/08/2008 16:39:25
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01336161
Message ID:
01336172
Vues:
13
>I start the object with:
>
>pop3 = CREATEOBJECT("JMail.Pop3")
>
>Then I do tests with AMEMBERS
>
>AMEMBERS(arrayPop3, pop3, 3 )
>
>&& returns OK
>
> AMEMBERS(arrayPop3, pop3.Messages, 3 )
>
>&& returns OK
>
> AMEMBERS(arrayPop3, pop3.Messages.item, 3 )
>returns message " Invalid number of parameter"
>
>
>But if I display pop3.Messages with intelisense, the item member is there
>What can it be ?

Like Sergey said, Item is a method which will return an object - but you need to supply a parameter, so it would know which one to return from the collection. The trouble begins with the start - do the collection indexes start with 0 or 1? Or, if you don't want to use numeric indexes, how to get the members' keys. Another trouble is at the end - how many members does the collection have. Now this number may be in .messages.count or .messages.length or some other property.

If starting from 0
with pop3
   for i=0 to .messages.count-1
      loMsg=.messages.item(i)
...
If starting from 1
with pop3
   for i=1 to .messages.count
      loMsg=.messages.item(i)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform