Topic
6 replies Latest Post - ‏2012-10-16T22:25:16Z by njsmith
SarahW
SarahW
4 Posts
ACCEPTED ANSWER

Pinned topic hasCopyableTableAttributes

‏2012-04-30T17:27:46Z |
We are currently using DOORS version 9.0.0.0. I am currently testing our DXL scripts in DOORS version 9.3.0.7.

In one of our customized scripts, we call the old Telelogic include file "word.inc".

In word.inc, there is a function called (void wordDumpTableAttributeVBA(Object o)) that has the following start to an "if" statement: if (!hasCopyableTableAttributes(o))

The word.inc include file works in DOORS 9.0.0.0 but I get the following error when I try to run it in 9.3.0.7.

Is hasCopyableTableAttributes(o) no longer a valid DOORS function in version 9.3.0.7?

Is there a substitute for the Telelogic "word.inc" file?

************************************************************************************

  • DXL: <R:\working\DXL\ole_functions\word.inc:1641> incorrect argument for (!)
Included from:
<R:\working\DXL\modules\baselineCompare2.inc:38>
<R:\working\DXL\modules\baselineCompareExplorer.dxl:25>
<Line:1>
-E- DXL: <R:\working\DXL\ole_functions\word.inc:1641> incorrectly concatenated tokens
Included from:
<R:\working\DXL\modules\baselineCompare2.inc:38>
<R:\working\DXL\modules\baselineCompareExplorer.dxl:25>
<Line:1>
-E- DXL: <R:\working\DXL\ole_functions\word.inc:1641> undeclared variable (hasCopyableTableAttributes)
Included from:
<R:\working\DXL\modules\baselineCompare2.inc:38>
<R:\working\DXL\modules\baselineCompareExplorer.dxl:25>
<Line:1>
-E- DXL: <R:\working\DXL\ole_functions\word.inc:1641> incorrect arguments for (if)
Included from:
<R:\working\DXL\modules\baselineCompare2.inc:38>
<R:\working\DXL\modules\baselineCompareExplorer.dxl:25>
<Line:1>
-I- DXL: All done. Errors reported: 4. Warnings reported: 0.

************************************************************************************

Thanks for any help.
Updated on 2012-10-16T22:25:16Z at 2012-10-16T22:25:16Z by njsmith
  • llandale
    llandale
    2939 Posts
    ACCEPTED ANSWER

    Re: hasCopyableTableAttributes

    ‏2012-04-30T18:45:36Z  in response to SarahW
    This is what happens when you depend on "undocumented" software, its subject to change; tough luck for you. Someone at my company had the same issue.

    There is this function in the new itfutil.inc"
    • bool hasCopyableTableAttribute(Object o, string attributeName)
    • {
    • return (canRead o) && (!null attributeName) && canRead(o.attributeName)
    • }
    • // notice it's name lacks a trailing "s".
    which is called from the new word.inc.

    -Louie
    • JeanetteKreutner
      JeanetteKreutner
      2 Posts
      ACCEPTED ANSWER

      Re: hasCopyableTableAttributes

      ‏2012-05-16T00:37:55Z  in response to llandale
      Thanks for this post. We had several scripts that had this function call and now they work again
    • njsmith
      njsmith
      2 Posts
      ACCEPTED ANSWER

      Re: hasCopyableTableAttributes

      ‏2012-10-14T03:56:49Z  in response to llandale
      We're having the same issue:

      -E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect argument for (!)
      Included from:
      <C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
      <Line:1>
      -E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrectly concatenated tokens
      Included from:
      <C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
      <Line:1>
      -E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> undeclared variable (hasCopyableTableAttributes)
      Included from:
      <C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
      <Line:1>
      -E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect arguments for (if)
      Included from:
      <C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
      <Line:1>
      -I- DXL: All done. Errors reported: 4. Warnings reported: 0

      At first I commented out the hasCopyableTableAttributes per someone's recommendation but it is called by wordDumpTableAttributeVBA and when I reran, got these errors:

      -E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1857> incorrectly concatenated tokens
      Included from:
      <C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
      <Line:1>
      -E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1857> undeclared variable (wordDumpTableAttributeVBA)
      Included from:
      <C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
      <Line:1>
      -I- DXL: All done. Errors reported: 2. Warnings reported: 0

      Then I saw your post, Louie, so I uncommented it and just removed the trailing s. Now I get these errors:

      -E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect argument for (!)
      Included from:
      <C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
      <Line:1>
      -E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect arguments for function (hasCopyableTableAttribute)
      Included from:
      <C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
      <Line:1>
      -E- DXL: <addins/word_Voyager/V1/exportSRS.inc:1760> incorrect arguments for (if)
      Included from:
      <C:\Program Files\IBM\Rational\DOORS\9.4/lib/dxl/addins/word_Voyager/V1/exportDialogSRS.dxl:17>
      <Line:1>
      -I- DXL: All done. Errors reported: 3. Warnings reported: 0.

      I'm sure this would be easier to debug if I was a Programmer. :-)

      Here is that piece of the program:

      //Function to dump the Object text or table cell value
      void wordDumpTableAttributeVBA(Object o)
      {
      string errMess = ""
      if (!hasCopyableTableAttribute(o))
      {
      return
      }
      string attribName = o.(reserved AMainColumnAttribute)
      Buffer textBuffer = create
      probeRichAttr_(o,attribName,textBuffer,true)
      if (0 < length textBuffer) {
      if (issueWarnings && containsUnregisteredOle(o.attribName)) {
      warningBox "Object " (identifier o) " contains one or more unregistered OLE objects in '" attribName "'.\n\nThese OLE objects will be exported as pictures."
      }
      errMess = applyStyleLockPasteInvoke(objSel, richText tempStringOf textBuffer, getStyleForAttribute(o, attribName))
      }
      delete(textBuffer)
      if (!null errMess)
      {
      logError("Error pasting attribute '"attribName"' of cell", errMess, o)
      }
      collapseSelection
      vbaCheckRes(oleMethod(objSel, cMethodTypeBackspace))
      }
      • llandale
        llandale
        2939 Posts
        ACCEPTED ANSWER

        Re: hasCopyableTableAttributes

        ‏2012-10-15T19:18:00Z  in response to njsmith
        You should probably get in the habit of saving the "dxl" folder of each installed DOORS client,
        • e.g. folder "Doors_v9001_DXL"
        So when you are using these functions that no longer work you can go track them down and add them to your code.

        -Louie
        • njsmith
          njsmith
          2 Posts
          ACCEPTED ANSWER

          Re: hasCopyableTableAttributes

          ‏2012-10-16T22:25:16Z  in response to llandale
          Good idea, Louie.
          FYI...I actually went back and commented out just the "hasCopyableTableAttribute" section of the wordDumpTableAttributeVBA function and it works fine now.
  • SarahW
    SarahW
    4 Posts
    ACCEPTED ANSWER

    Re: hasCopyableTableAttributes

    ‏2012-10-16T17:24:19Z  in response to SarahW
    Thank you, your answer works.