Zvone wrote:
You have to reset property MsgNum to zero before both List() and Uidl().
Alright, that seems to work, although it is not entirely logical to me. I'll
put it in the wiki documentation when updating it along with one "complete"
example. Thanks Arno.
Simple: when you call LIST with no parameters, the command is issued in
"list mode", so that all messages are listed and an event is triggered
per message. The same for the UIDL command.
During the processing of both commands in "list mode", the MsgNum
properly is incremented (actually, it is extracted from the first
numeric value for each line returned by the server, which represents the
message number), so that at the end of the command, the MsgNum property
points to the last message in the list returned.
If you issue UIDL after LIST (or vice versa, or the same command twice
in a row), since the MsgNum property is non-zero, only *that* message is
retrieved. The events for "list mode" described before are not
triggered because no list is returned; only OnRequestDone is triggered,
as with any other command which expects a single line.
As Arno said, if you want to call UIDL and LIST in "list mode", you must
make sure that the the MsgNum property is set to zero.
I hope this helps,
dZ.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be