Hi Jang,
Thank you for your response!
I don't understand how "oXRef.XRefIsUnresolved = true" can end this loop. I was sure the loop will continue as long as oXRef.ObjectValid( ) is true. BTW, isn't the "return false;" supposed to come after "else" (that doesn't appear in your example)?
Thanks,
Roman
Jang, Roman is using FrameScript and FrameScript functions don't have a return statement that immediately exits the function like ExtendScript does. Instead, FrameScript functions return a built-in "Result" variable that you can set as the return value of the function. In FrameScript, you would do something like this:
Function DocHasUnresolvedXRefs oDoc
//
Local Result(0), oXRef(0);
Set oXRef = oDoc.FirstXRefInDoc;
Loop While(oXRef)
If oXRef.XRefIsUnresolved = 1
Set Result = 1;
LeaveSub; // Exit the function.
EndIf
Set oXRef = oXRef.NextXRefInDoc;
EndLoop
//
EndFunc
You can call this function with something like this code like this:
If DocHasUnresolvedXRefs{oDoc} = 1
// Document has unresolved cross-references.
Else
// No unresolved cross-references.
EndIf
-Rick