New Posts New Posts RSS Feed: PropertyVerifiers
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

PropertyVerifiers

 Post Reply Post Reply
Author
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post Topic: PropertyVerifiers
    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.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
orcities View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28-Aug-2007
Location: United States
Posts: 454
Post Options Post Options   Quote orcities Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down