Quantcast
Channel: Adobe Community: Message List - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 3715

Re: How to get the flags for GetText()?

$
0
0

Thanks for that simple answer Rick, I appreciate it. I knew it was simpler than the docs presented it.

 

Assuming that ExtendScript technical writers monitor this forum (and for anyone else with a confusion over this), here are my suggestions to clarify the FrameMaker 10 Scripting Guide, p.452, section on GetText() for the Cell object (and also the Cell.GetText() page in the ExtendScript Object Model docs):

 

  • Give a simple example of the use of the constants with the pipe (OR) character, like Rick's example above. That would have saved a lot of time.
  • Don't mention the DeallocateTextItems() method, you don't have to deallocate memory in ExtendScript or JavaScript. Also DeallocateTextItems() does not exist. This was apparently copied over from the FDK manual.
  • Don't mention bitwise ORing unless you clearly explain that it simply means to separate constants with the pipe ( | ) character. It implied to me that I was going to have to have to get into the JavaScript bitwise operators, which is not correct. The concept of bitwise OR might be useful for a C programmer using the FDK, but it is probably counterproductive for nearly everyone who uses ExtendScript.
  • Instead of presenting the table of constants as the values of TextItem.dataType, present them as the constants you need to give as the flags parameter for GetText(). Now that I know what that table is, it is very useful. But when it is presented as the values of TextItem.dataType with no further explanation, I disregarded it completely because it seemed like something I didn't need to know.

 

Thanks for listening.

Mark


Viewing all articles
Browse latest Browse all 3715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>