IsCurrentObjectInvalid method (WinStudio scripts)

Applies To

IWSIDOCollection interface

Definition

Returns a Boolean value indicating whether the current object in the specified IDO collection is in an error state.

Syntax

object.IsCurrentObjectInvalid( )

  Part   Description
object Required. The name of a valid IDO collection object.

Remarks

A return value of:

  • TRUE indicates that the current object has an error.
  • FALSE indicates that the current object does not have an error.

If the specified IDO collection has focus, use this method. If the specified IDO collection might not have focus, use the IsObjectInvalid method.

Example

Sub Main()
    Dim SubColCache As IWSIDOCollection
    Dim bValue As Boolean
    
    SubColCache = ThisForm.Components(GetParameter(0)).IDOCollection
    
    bValue  = SubColCache.IsCurrentObjectInvalid()
    
    ' If the current object is in an error state, test to see if it has been modified.
    If bValue Then
        ' If the current object has been modified, mark the current object as unmodified.
        If SubColCache.IsCurrentObjectModified() Then
            SubColCache.SetCurrentObjectModified(FALSE)
        End If
    End If
End Sub