Create Descriptor


Author
Message
Kevin Lingofelter
Kevin Lingofelter
StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)StrataFrame Novice (123 reputation)
Group: Forum Members
Posts: 77, Visits: 804
When creating custom code, I have the option "Create Descriptor" selected. When I run the app, I get an error that says I may be missing a custom descriptor.

With this option selected, do I still need to do this? If so, what does this option do?

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
That is a pending fix, actually... the BOMapper isn't creating the property descriptors, even when the Create Descriptor option is checked.  I'll have to debug it, because the code for the code generation is correctly testing on the property. 

However, there is a workaround for custom properties.

using MicroFour.StrataFrame.Business;
...

protected override FieldPropertyDescriptor[] GetCustomBindablePropertyDescriptors()
{
    return new FieldPropertyDescriptor[] { new ReflectionPropertyDescriptor("MyProperty", typeof(MyBusinessObject)) };
}

You have to do this whenever you create a custom property that is not part of the designer file if you want to be able to bind to the property.

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
OK, it was creating the descriptor properly when the checkbox was checked, but it was not adding the descriptor to the PropertyDescriptors collection within the business object, so I corrected the problem and it will be in the next update.  But, like I said, that workaround will work until we get you another update.
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