• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Extendscript - Book component type - ES bug or doc error?

Mentor ,
Jan 20, 2014 Jan 20, 2014

Copy link to clipboard

Copied

Hi,

(FM 11, Win XP)

When you query ComponentType for an FM document book component, you get hexadecimal 0x200 which happens to equal Constants.FV_BK_FILE. However, the documentation says that this property should return one of:

• Constants.FV_BK_FOLDER (0x02) - Folder

• Constants.FV_BK_GROUP (0x40) - Group

• Constants.FV_BK_FM (0x8) - FrameMaker document

• Constants.FV_BK_MIF (0x10) - MIF document

• Constants.FV_BK_XML (0x20) - XML document

Given the supposed MIF and XML options, I'm not sure if there is a bug in ES or if the documentation is just wrong. An XML component also returns 0x200. Any thoughts?

Thanks,

Russ

TOPICS
Scripting

Views

608

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 22, 2014 Jan 22, 2014

Copy link to clipboard

Copied

LATEST

Hi Russ,

same issue here (FM 11, Win7). I'm not sure, but in my opinion it's an error in the documentation. The values for ComponentType should be:

  • Constants.FV_BK_FOLDER (0x2): Folder
  • Constants.FV_BK_GROUP (0x40): Group
  • Constants.FV_BK_FILE (0x200): File

Additionally you could check the sort of file type via BookComponentFileType (FM, MIF, XML, Ditamap).

In a short test script for traversing a hierarchical book the BookComponentFileType has some more values:

  • Constants.FV_BK_FOLDER (0x2): Folder
  • Constants.FV_BK_BOOK (0x4): Book (inside another book)
  • Constants.FV_BK_FM (0x8): FrameMaker document
  • Constants.FV_BK_MIF (0x10): MIF document
  • Constants.FV_BK_XML (0x20): XML document (also Ditamap and Bookmap)
  • Constants.FV_BK_GROUP (0x40): Group

The main difference between ComponentType and BookComponentFileType seems to be the more detailed information about the file type.

Best Regards, Andreas

Message was edited by: justBE

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines