Question
Multiple Labeled PageItems
I was faced, this morning, with writing some code that would determine whether or not a reference obtained by:
dataFrame = myDoc.textFrames.item("MyLabel");
return 0, 1 or more items.
0 is easy because dataFrame == null in that case
1 is easy because things work just the way you want them. But how do you know if you have more than 1 returned?
In my case, I was trying to get the contents of what was supposed to be a unique text frame. I decided to test to see if there might be (accidentally) more than one. I'll post my solution in the first message.
dataFrame = myDoc.textFrames.item("MyLabel");
return 0, 1 or more items.
0 is easy because dataFrame == null in that case
1 is easy because things work just the way you want them. But how do you know if you have more than 1 returned?
In my case, I was trying to get the contents of what was supposed to be a unique text frame. I decided to test to see if there might be (accidentally) more than one. I'll post my solution in the first message.