Waits for this Phidget to become available.

Namespace:  Phidgets
Assembly:  Phidget21.NET (in Phidget21.NET.dll) Version: 2.1.9.34

Syntax

C#
public void waitForAttachment()
Visual Basic (Declaration)
Public Sub waitForAttachment
Visual C++
public:
void waitForAttachment()

Remarks

This method can be called after open has been called to wait for thid Phidget to become available. This is usefull because open is asynchronous (and thus returns immediately), and most methods will throw a PhidgetException is they are called before a device is actually ready. This method is synonymous with polling the isAttached method until it returns True, or using the Attach event.

This method blocks indefinitely until the Phidget becomes available. This can be quite some time (forever), if the Phidget is never plugged in.

This method uses the attach handler internally to determine when the Phidget becomes available.

Exceptions

ExceptionCondition
Phidgets..::.PhidgetExceptionIf this Phidget is not opened.

See Also