🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
3 messages
3 total messages Started by Joaquin_Zarasul Tue, 17 Mar 2009 07:57
[JS CS3] Tab Stops in Table
#597
Author: Joaquin_Zarasul
Date: Tue, 17 Mar 2009 07:57
8 lines
1159 bytes
Below is a function that would delete all existing tab stops in a column and the add a new tab stop.

function TabStopper (myPosition, xx){
		myTable.columns.item(xx).cells.everyItem().texts[0].tabStops.everyItem().remove();
		myTable.columns.item(xx).cells.everyItem().texts[0].tabStops.add({position:myPosition, alignment:TabStopAlignment.CHARACTER_ALIGN, alignmentCharacter:")"});
}

The problem is that this works well with CS2 but not with CS3. In CS3, only the tab stops in the last cell of the selected column are removed. Can anybody please help analyze what the problem is. Thank you so much.
Re: [JS CS3] Tab Stops in Table
#701
Author: Peter Kahrel
Date: Tue, 17 Mar 2009 10:45
16 lines
1025 bytes
Joaquin,

Strange indeed that that doesn't work. You can get around it by using this method:



function TabStopper (myPosition, xx){ 
   myTable.columns.item(xx).cells.everyItem().texts[0].tabList =  
	[{position:6, alignment:TabStopAlignment.CHARACTER_ALIGN, alignmentCharacter:")"}]; 
}



When you set a tabList like this, any other tabstops are deleted, and this works in CS3. (CS4 restores CS2's behaviour.)

Peter
Re: [JS CS3] Tab Stops in Table
#706
Author: Joaquin_Zarasul
Date: Tue, 17 Mar 2009 12:00
5 lines
632 bytes
Peter,

That was great! Thank you so much!

-JQ
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads