Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

CC2014 Changing unassigned to TEXT_TYPE bug?

$
0
0

If I make a document with one unassigned box and change it to text_type I can add contents to the textframe.


app.documents[0].pages[0].allPageItems[0].contentType = ContentType.TEXT_TYPE;
app.documents[0].pages[0].allPageItems[0].contents = 'TEST';

 

But if I also create a textframe, group these, and with a script ungroup, loop thru them and to the exact same thing, it changes type but I cant add contents to it:

 

var group = app.documents[0].pages[0].allPageItems[0];
var group_items = group.allPageItems;


group.ungroup();


for( var i = group_items.length - 1; i >= 0; i-- )
{  if( group_items[i].contentType == ContentType.unassigned )  {  app.select( group_items[i] );  group_items[i].contentType = ContentType.TEXT_TYPE;  group_items[i].contents = 'TEST';  }  else  {  group_items[i].remove();  }
}

Viewing all articles
Browse latest Browse all 15932

Trending Articles



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