Inherited Browse Dialog problem
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Inherited Browse Dialog problemExpand / Collapse
Author
Message
Posted 02/13/2008 1:01:24 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:22:13 PM
Posts: 329, Visits: 1,991
Hi ,

My browse dialogs inherit's from my base class browse dialog that inherits from the SF browse dialog. Serialization doesn't seem to work anymore. Now if i make any change to my browse dialog via the property every single stitch of code the was serialized in the init component is "smoked"... and obviusly the property i meant to change is not persisted either. Before I start ripping into this did something change since 1.60 that may cause this?

Thanks

Post #14357
Posted 02/13/2008 1:14:26 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:13:06 AM
Posts: 4,104, Visits: 4,176
Before I start ripping into this did something change since 1.60 that may cause this?

No.  This has nothing to do with the BrowseDialog class, but rather the .NET serialziation designer.  In fact, we take this same approach for all of our browse dialogs in our medical app (and I even created a new one this morning).  One thing that helps, though, is to set the class structure up like a form or user control with the designer file:

Post #14359
Posted 02/13/2008 1:16:27 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:22:13 PM
Posts: 329, Visits: 1,991
I see what is going on. Because my browse dialog is inheriting from my base browse dialog which then inherits from SF.BrowseDialog the IsInheritedBrowseDialog fuction is returning false,

overriding that function and everythign is happy.

Paul

Post #14360
Posted 02/13/2008 1:24:31 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:22:13 PM
Posts: 329, Visits: 1,991
I am not sure why IsSubclassof (BrowseDialog) returns false though. I would think that because it ultimatly is a sublclass of browsedialog it should work shouldnt it?

I am set up like this/

Public Class AL_BrowseDialog'--My Base Class Browse Dialog

Inherits MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog

and

Namespace BrowseDialogs

Public Class CustomerBrowseDialog

Inherits Base.BrowseDialogs.AL_BrowseDialog

 No big deal as overriding the function works but just currious

Paul

Post #14362
Posted 02/13/2008 1:41:02 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:13:06 AM
Posts: 4,104, Visits: 4,176
I would think that because it ultimatly is a sublclass of browsedialog it should work shouldnt it?

No....in fact, I spent a lot of time yesterday trying to get a generic type to work with the ITypeDiscovery interface and the IsSubClassOf.  Since you are two deep, the IsSubClassOf may not work since your browsedialog actually is a direct subclass of your base browsedialog.  You can make it work by "jacking" with some of the options and you may even play with the Type.ReflectionOnlyGetType to see if it returns differently.  But this can get confusing with there are multiple inheritances.

Post #14367
Posted 02/13/2008 1:49:51 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Yesterday @ 3:22:13 PM
Posts: 329, Visits: 1,991
Yeah that's about what I figured. Thanks for the info.. I am sure I will run into that again
Post #14370
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 6:02pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.