TranslateBusinessObjects casts SourceContainer to BaseForm


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 am trying to use this routine to translate BO's from a UserControl to a dialog form.  I pass the UserControl as the SourceContainer, but I get an error because in this routine you are casting the SourceContainer to a BaseForm.  Shouldn't you check to see if this is a form before doing this line?  Everything else works with any kind of ContainerControl except this line which isn't needed in that case right?

CType(SourceContainer, BaseForm).RemoveObjectFromInitOnFormLoad(DestinationBusinessObject)


Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Actually no...this method is intended for Form use only.  I will look for verification, but this method was written to support the BaseForm translations. 
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
If that's the case you may want to make the types it takes Form types instead of ContainerControl types.   Is there a way I can accomplish the translation going from a UserControl to a Form? 

Will SharedDataTableKey do what I want here?  I have tried to use that feature before and haven't had a lot of luck with it.  I inevitably get an error about the key not being the dictionary when I try to view the form in the designer. 

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