BOMapper - Custom Data Types Problem


Author
Message
Tim Dol
Tim Dol
StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I created an new enum and want to assign it to one of my fields. (I've done this many times in the past...pre 1.6).  I perform a search in the custom data type fields but it doesn't return anything. I have a number of existing enums and just added a new one. I tried again and it crashed visual studio with Out of Memory errors.  I restarted and tried again but it doesn't seem to find anything and/or crashes again.

I can manually enter the enum name 'enum_CRMRoleType'. I then rebuild the partial class but when I rebuild the project I get an error 'Type enum_CRMRoleType' is not defined.

I haven't created an enum in a while but it did work a while back.

Any ideas as to why it can't find my enums?

Thanks,

Tim

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
If it cannot find it when you manually type it in, then it is not visible by the compiler when assigned to the strong-typed property.  This is generally because a reference is missing or the namespace is different than the BO.  If you provide the full namespace and it still cannot be found, you are missing a reference.  As for the Out of Memory exceptions, I am not sure.  I have been running this version for a really long time and lately it has been "enum city" for me and I have not had any issues.  However, the other day I did get an exception when the compiler was starting to act funny.  I was in a large project and things were becoming sluggish because of the compiler and I did a search for an enum and got an exception, but it was because the compiler was flaking out on me.  I actually reboot my computer, went back in, and haven't had an issue since.....and this was last week sometime.
Tim Dol
Tim Dol
StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Okay after some more investigation, I discovered that I did neglect to enter the full namespace when I manually entered the data type.  This works now when I manually enter. Thanks.Smile

With respect to the search. Each time I perform a search, it returns nothing and Visual Studio crashes. Could this indicate some type of corruption in my solution? I have 6 projects in one solution, if that matters.  Also, for the heck of it I tried doing the same search using the sample CRM project and it worked fine.

StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
It's probably not corruption in your solution, but rather something in your code model that we're not expecting, so an exception in thrown, which crashes VS.  When we search for enums, we search through all of the references, but to search within the solution itself, we have to go through the code model of each of the files in the solution and if the code model is weird, it might crash.
Tim Dol
Tim Dol
StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Well I can live with having to manually entering the enum in the BO mapper for now but I discovered a bigger problem.

When I try to use the enum for combobox population and perform a search in the PopulationDataSourceSettings, Visual Studio crashes with the attached error. This property doesn't seem to allow me to manually populate the value so I have to search for it. I also tried to manually set the property via code in the load event but it also produces an error. Should you be able to manually populate? . The error varies based on the controls on my form.  This one just happens to have the UltraOPtionSet Control on it. It also crashed with an UltraTabControl on another form.

Attachments
EnumSearchError.png (72 views, 22.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Should you be able to manually populate?

You can in code if your provide the full name to the class.  I have had to do this on certain occasions.  As for the error...I really do not know.  It looks like a design-time render error within Infragistics....but I would have to get this in a reproducable state first to even have a clue where to tell you to look.

Tim Dol
Tim Dol
StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)StrataFrame User (446 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I was able to finally get the code working. I used the wrong property the first time I tried. When I get some time I will try to reproduce in a small project.

One other strange thing I noticed with custom data types.  Select Case doesn't seem to evaluate the data type. I had to change everything to If's.  Have you every run across this before?

Thanks

Tim

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Have you every run across this before?

Depends on the type of value you are testing on.  If you are testing a reference type then you may have to use an if/elseif.  However, if you use any type of value type (i.e. integer) then you can always go with select case.

StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
On a custom data type, did you override the System.Object.Equals(object obj) method on your custom type?  I think that's what a Select Case evaluates when comparing the value in the select with the values in the case.
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