MsgsToBCLog: BlackCherrySidedoor.MsgFromRopesProc = {
tc: ViewerTools.TiogaContents;
IF msgList = NIL THEN RETURN[NIL, NIL, NIL, FALSE];
tc ¬ WalnutOps.GetMsg[wH.opsH, msgID ¬ msgList.first].contents;
IF ( counter ¬ counter + 1 )
MOD 10 = 0
THEN WalnutWindow.ReportFormat[wH, "(%g) ", [integer[counter]] ]
ELSE WalnutWindow.ReportRope[wH, "."];
msgList ¬ msgList.rest;
text ¬ tc.contents;
formatting ¬ tc.formatting;
unRead ¬ NOT WalnutOps.GetDisplayProps[wH.opsH, msgID].hasBeenRead;
};
FOR mL:
LIST
OF
ROPE ¬ msgSetNames, mL.rest
UNTIL mL =
NIL
DO
msgSet: ROPE ~ mL.first;
ok: BOOL ¬ FALSE;
num: INT ¬ WalnutOps.SizeOfMsgSet[wH.opsH, msgSet].messages;
fileName: ROPE ¬ FS.ExpandName[Rope.Concat[msgSet, ".mailLog"]].fullFName;
IF num = 0
THEN {
WalnutWindow.ReportFormat[wH, "MsgSet %g is empty - skipping\n", [rope[msgSet]] ];
LOOP;
};
WalnutWindow.ReportFormat[wH, "Starting msgSet %g (%g msgs), on file %g\n", [rope[msgSet]], [integer[num]], [rope[fileName]] ];
msgList ¬ WalnutOps.MsgsInSetEnumeration[wH.opsH, msgSet].mL;
counter ¬ 0;
ok ¬ BlackCherrySidedoor.CreateBCMailLogFromRopes[fileName, MsgsToBCLog];
IF ok
THEN WalnutWindow.ReportFormat[wH, "\n\tDone with %g\n\n", [rope[msgSet]] ]
ELSE WalnutWindow.ReportFormat[wH, "Problems accessing msgSet %g ***\n\n", [rope[msgSet]] ];
ENDLOOP;