It's all about the answers!

Ask a question

Having issues with my script

Christopher Cote (112) | asked Jun 07, 10:15 a.m.

I have a script that appears to be getting called twice, but I only see it once after it has been defined.  Here is an abbreviated version of my code:

Stream outMain = write CMG_USER_DESKTOP \\DLDUpdates.html
Buffer bufHTML = create;
storeAllObjects(Module m) {
     Object o;
     Skip sk = create();
     int absNum = 0;

     Baseline lastBL = getMostRecentBaseline(m);
     Module mBaseline = load(m, lastBL, true);

     for o in entire mBaseline do {
          absNum = o."Absolute Number";
          put(sk, absNum, o);
     return sk;
void writeHTMLHeader(Stream& out) {
     bufHTML += "<!DOCTYPE html>\n";
     bufHTML += "<html moznomarginboxes mozdisallowselectionprint>\n";
     bufHTML += "<head>\n";
     bufHTML += "<style>\n";
     bufHTML += "   body {\n";
     bufHTML += "        font-size: 11.5px;\n";
     bufHTML += "   }\n";
     bufHTML += "</style>\n";
     bufHTML += "</head>\n";

     out << bufHTML;
     infoBox("Write HTML Header\n" bufHTML "");
void createNewUpdatedFunctionsReport(Stream& out) {
     Module m = read("DXL Library Data - Customized", true);
     Object obj;
     int absNum;
     Skip skOldObjs = create();

     skOldObjs = storeAllObjects(m);
     bufHTML += "<body>\n"
     for obj in current(m) do {

     absNum = obj."Absolute Number";
     infoBox("Absolute Number: " absNum ""); 
     bufHTML += "</body>\n"
     bufHTML += "</html>\n"
     out << bufHTML;
I don't understand, but writeHTMLHeader is being written twice.  And the createNewUpdatedFunctionsReport is called but it doesn't get into the for-loop.
Is there anyone out there who can help me out with this?

2 answers

permanent link
Christopher Cote (112) | answered Jun 07, 10:17 a.m.

There is an ending curly brace at the end of the for-loop after the infoBox.

permanent link
Christopher Cote (112) | answered Jun 09, 8:09 a.m.
edited Jun 09, 8:10 a.m.

I'm actually missing an ending curly brace that I need after the infoBox in createNewUpdatedFunctionsReport.  That would close the for-loop.  Thanks for the 2nd look.

Your answer

Register or to post your answer.