Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Amembers
Message
From
03/08/2008 16:39:25
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01336161
Message ID:
01336172
Views:
14
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform