Hello fellow scripters,
I am trying to get a script include a TOC in a generated book. I can add the new BookComponent (copied from a template file) as a TOC, set it to generatable and include it in the update process, but all I get is an empty TOC, as the ExtractTags property of the new BookComponent is not set. I tried to set this property by passing it a string array but that action is completely ignored. Then I got the propVals array and tried to set the property there, then pass back the propVals. That is where FM12 hangs up and I have to restart it to become responsive again.
This is the piece of code I am using:
oaProps = oComp.GetProps ( ); |
i = GetPropIndex ( oaProps, Constants.FP_ExtractTags ); |
oaProps[i].propVal.ssval.push ( "Title_0" ); | |
oaProps[i].propVal.ssval.push ( "Title_1" ); | |
oaProps[i].propVal.ssval.push ( "Title_2" ); | |
oComp.SetProps ( oaProps ); |
Maybe I am doing something illegal here but the local copy of my properties does show the strings as I push them into the ssval array. There must be a specific way to set these strings array propVals but there is no documentation about it. Does anyone have experience with this ?
Thanks
Jang