Question:
In an application, how can I determine whether an object has any links between an XControl and a few XObjects that work as source?
Example: A screen object has the following properties: ‘source1’, ‘source2’, and ‘source3’, whose type is server object. These objects can be linked to any number of sources (3, 2, 1, or 0). How can I test, via scripts, if these sources exist?
Solution:
To do so, you can use the following script in the XControl’s event:
On error resume next
fonte1 = XControl1.Connection.Pathname
If err.number = 0 then
MsgBox “Connected”
Else
MsgBox “Disconnected”
End If
NOTE: Attached to this article is a sample application that illustrates the solution described above.