Print Page | Close Window

PropertyVerifiers

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1766
Printed Date: 21-Apr-2026 at 10:44am


Topic: PropertyVerifiers
Posted By: orcities
Subject: PropertyVerifiers
Date Posted: 28-Apr-2010 at 11:42am
I am migrating from Classic to Winforms 2010. In classic I override my property to add a StringLenthVerifier with MinValue = 1.
 
When I try to do the same in 2010 it says I already have a Property with that name. Override key word does nothing.
When I just add it to the Designer.cs I get a null reference exception when validation occurs. I can not trace down the null ref. Each value in the method that throws the error has a value.



Replies:
Posted By: orcities
Date Posted: 28-Apr-2010 at 12:21pm
I got rid of the null ref exception. To do so I had to delete all the Generated Developer Classes, which were all empty, then recreate them.


Posted By: orcities
Date Posted: 28-Apr-2010 at 3:06pm
And yet another question:
 
In classic to to PostSet you had to put AfterSetValue in the property. Where do you put that in 2010?


Posted By: IdeaBlade
Date Posted: 28-Apr-2010 at 5:25pm
Verification in DF2010 (and DF2009) is handled as part of the property interception process. Business type properties in DF2009/10 are not generated to be overrideable: instead, you influence their behavior by means of property interceptors. You should review the topic document on Property Interceptors in the Learning Resources.

With respect to Verification, be aware that the documentation has not yet been brought up to date for DF2010. There is some rough documentation in the Release Notes, but that is relative to Verification as implemented in DF2009. We'll get that documentation updated by the next release of DF2010. You could get a general orientation by perusing the DF2009 topic document "Validation Through Verification".  The DF2010 approach is similar, though some details are different.



Print Page | Close Window