Run-time error

Mkontwg

Member
Hi Team

i have created properties and they appear well on the design. I have attached screen shots. problem i'm getting "Invalid handle, not point to a delegate"
Code:
CLASS Client.Structure.Controls.nrsTextbox INHERITS UltraTextEditor: 
    
    DEFINE PRIVATE VARIABLE components AS System.ComponentModel.IContainer NO-UNDO.
    DEFINE PRIVATE VARIABLE valTextMessage AS Infragistics.Win.Misc.UltraValidator NO-UNDO.
    DEFINE PRIVATE VARIABLE clsValidate  AS AppServer.Managed.clsValidate NO-UNDO.
    DEFINE PRIVATE VARIABLE oOp AS ConditionOperator NO-UNDO.

         
    DEFINE PUBLIC PROPERTY pcConditionValue AS CHARACTER NO-UNDO 
    GET.
    SET. 

    DEFINE PUBLIC PROPERTY pcDataType AS CHARACTER NO-UNDO 
    GET.
    SET. 

    DEFINE PUBLIC PROPERTY pcErrorMessage AS CHARACTER NO-UNDO 
    GET.
    SET. 

    DEFINE PUBLIC PROPERTY plIsRequired AS LOGICAL NO-UNDO 
    GET.
    SET.     

    DEFINE PUBLIC PROPERTY plIsValidated AS LOGICAL NO-UNDO 
    GET.
    SET.         

    DEFINE PUBLIC PROPERTY plNotEqual AS LOGICAL NO-UNDO 
    GET.
    SET. 

    DEFINE PUBLIC PROPERTY plValidate AS LOGICAL NO-UNDO 
    GET(): 
        
    RETURN plIsValidated.
    END GET.
    SET(INPUT arg AS LOGICAL) : 
    plIsValidated = arg.
    
    IF arg THEN DO: 
        IF plNotEqual = TRUE THEN DO:
            oOp = ConditionOperator:NotEquals. 
    END.
    THIS-OBJECT:valTextMessage:SetValidationSettings(THIS-OBJECT, 
                                            clsValidate:SetErrorCondition(valTextMessage,
                                                    THIS-OBJECT,
                                                    oOp,
                                                    pcConditionValue,
                                                    plIsRequired,
                                                    pcErrorMessage,
                                                    pcDataType
                                                    )).
    END.
    END SET. 
    
    CONSTRUCTOR PUBLIC nrsTextbox (  ):
        
        
        SUPER().
        InitializeComponent().
        
        CATCH e AS Progress.Lang.Error:
            UNDO, THROW e.
        END CATCH.

    END CONSTRUCTOR.

    METHOD PRIVATE VOID InitializeComponent(  ):
        
        /* NOTE: The following method is automatically generated.
        
        We strongly suggest that the contents of this method only be modified using the
        Visual Designer to avoid any incompatible modifications.
        
        Modifying the contents of this method using a code editor will invalidate any support for this file. */
        THIS-OBJECT:components = NEW System.ComponentModel.Container().
        @VisualDesigner.FormMember (NeedsInitialize="true").
        DEFINE VARIABLE appearance1 AS Infragistics.Win.Appearance NO-UNDO.
        appearance1 = NEW Infragistics.Win.Appearance().
        @VisualDesigner.FormMember (NeedsInitialize="true").
        DEFINE VARIABLE resources AS Progress.Util.ResourceManager NO-UNDO.
        resources = NEW Progress.Util.ResourceManager("Client.Structure.Controls.nrsTextbox").
        THIS-OBJECT:valTextMessage = NEW Infragistics.Win.Misc.UltraValidator(THIS-OBJECT:components).
        CAST(THIS-OBJECT:valTextMessage, System.ComponentModel.ISupportInitialize):BeginInit().
        CAST(THIS-OBJECT, System.ComponentModel.ISupportInitialize):BeginInit().
        THIS-OBJECT:SuspendLayout().
        /*  */
        /* valTextMessage */
        /*  */
        THIS-OBJECT:valTextMessage:NotificationSettings:Action = Infragistics.Win.Misc.NotificationAction:BalloonTip.
        THIS-OBJECT:valTextMessage:ValidationTrigger = Infragistics.Win.Misc.ValidationTrigger:OnValidating.
        /*  */
        /* nrsTextbox */
        /*  */
        resources:ApplyResources(appearance1, "appearance1").
        THIS-OBJECT:Appearance = appearance1.
        THIS-OBJECT:MaxLength = 8.
        resources:ApplyResources(THIS-OBJECT, "$this").
        CAST(THIS-OBJECT:valTextMessage, System.ComponentModel.ISupportInitialize):EndInit().
        CAST(THIS-OBJECT, System.ComponentModel.ISupportInitialize):EndInit().
        THIS-OBJECT:ResumeLayout(FALSE).
        CATCH e AS Progress.Lang.Error:
            UNDO, THROW e.
        END CATCH.
    END METHOD.

    DESTRUCTOR PUBLIC nrsTextbox ( ):

        IF VALID-OBJECT(components) THEN DO:
            CAST(components, System.IDisposable):Dispose().
        END.

    END DESTRUCTOR.

END CLASS.
 

Attachments

  • screen.PNG
    screen.PNG
    13 KB · Views: 9
  • test.PNG
    test.PNG
    69.3 KB · Views: 9
Top