Exception when setting RequiredFields


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I'm getting the following error for one of my BO's when I try to set the RequiredFields property:

"An error occurred while attempting to load this type editor:
Exception has been thrown by the target of an invocation."

I can map it without error through the BO Mapper and I have created several other BO's without problems.  What could cause something like this?

Replies
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
OK, that makes sense.  I can figure something else out to accomplish this.  A factory method will probably be a good way for me to go.  Thanks for the help!
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Andria,

I forgot to mention that if you ever want to test on some code that should on run at design-time, you can use the ReadOnly DesignMode property, like this:

If Me.DesignMode Then

'-- Code that should only run at design-time

End If

Unfortunately, this won't help you in this case, because the DesignMode property will always return False (because it isn't set) until after the constructor exits.  So, once an object has been instantiated, you can test on the property, but until it has been set, you cannot use it. 

Oh, and the property is Protected, so you can only access it within the object (unless you wrap it in a public property).

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search