KB-50288: Testing for links between an XControl and an XObject.

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.

Attachments:

Sample_50288.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *