<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:56.7pt 42.5pt 56.7pt 85.05pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>Hi Mike,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>Very nice workaround. Thanks.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>Rick<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Michael Pearson [mailto:mt_pearson@hotmail.com] <br><b>Sent:</b> Saturday, May 14, 2011 10:22 AM<br><b>To:</b> rick@rickquatro.com; framers@lists.frameusers.com<br><b>Subject:</b> RE: ExtendScript Table Object Bug<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Hi Rick,<br> <br>Yes, I can confirm this bug. ObjectValid() is false when returned via GetText().<br> <br>A workaround is to replace:    <br>tbl = textItems[i].obj;<br><br>with:<br>tbl = doc.GetUniqueObject(Constants.FO_Tbl, textItems[i].obj.Unique);<br><br>HTH,<br>Mike Pearson<br><br> <br>> From: rick@rickquatro.com<br>> To: framers@lists.frameusers.com<br>> Subject: ExtendScript Table Object Bug<br>> Date: Sat, 14 May 2011 09:42:15 -0400<br>> <br>> Hello All,<br>> <br>> I discovered a bug in FrameMaker 10's ExtendScript implementation. If anyone<br>> can verify this, please let me know.<br>> <br>> Summary: When you loop through the tables in the document, the ObjectValid()<br>> function returns true for each table as expected. However, when you get a<br>> list of tables using GetText(), the ObjectValid() function returns false for<br>> each table. This is a problem, because child objects of the table also<br>> return false. This is a serious problem because you can't, for example, loop<br>> through all of the cells in the table, because ObjectValid() is false for<br>> each cell.<br>> <br>> Here is an example that illustrates the problem. Open a new FrameMaker<br>> document and insert 2 or 3 tables in the main flow. Then run the code below<br>> and look at the JavaScript Console.<br>> <br>> var doc = app.ActiveDoc;<br>> <br>> // Loop through all of the tables in the document.<br>> var tbl = doc.FirstTblInDoc;<br>> while (tbl.ObjectValid()) {<br>> $.writeln("Loop through doc tables: " + tbl.ObjectValid());<br>> tbl = tbl.NextTblInDoc;<br>> } <br>> <br>> // Get a list of tables in the document's main flow.<br>> var flow = doc.MainFlowInDoc;<br>> var textItems = flow.GetText(Constants.FTI_TblAnchor);<br>> for (var i = 0; i < textItems.len; i += 1) {<br>> tbl = textItems[i].obj;<br>> $.writeln("Loop through main flow tables: " + tbl.ObjectValid());<br>> }<br>> <br>> Rick Quatro<br>> Carmen Publishing Inc.<br>> 585-659-8267<br>> rick@frameexpert.com<br>> <br>> FrameMaker 10 ExtendScript eSeminar<br>> May 26, 2011, 10:00 AM Pacific<br>> http://www.adobe.com/cfusion/event/index.cfm?event=detail&id=1751822&loc=en_<br>> us<br><br><o:p></o:p></span></p></div></body></html>