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

How to clone a data structure object (ExtendScript)?

$
0
0

Hi,

 

Is there some quick way to clone a data structure, like a text range, rather than doing all this:

 

newTR = new TextRange();

newTR.beg.obj = oldTR.beg.obj;

newTR.beg.offset = oldTR.beg.offset;

newTR.end.obj = oldTR.end.obj;

newTR.end.offset = oldTR.end.offset;

 

I tried this, but it failed as I expected:

 

newTR = oldTR.clone();

 

I tried this, but I got back the same object:

 

newTR = new TextRange(oldTR.beg, oldTR.end);

 

Any ideas?

 

Thanks,

Russ


Viewing all articles
Browse latest Browse all 3715

Trending Articles



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