Maintenance Tool Strip and DevExpress


Author
Message
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
Jason,

It is really pretty dangerous to do what you have done here for a number of reasons.  You are putting yourself out on an island here so you will never be able to reliably load a new SF build without breaking the changes here.  I would recommend a totally different approach here.

First of all, you would be better off copying the BaseForm code out of the SF source and creating your own base classes versus changing the SF code itself.  This way you can at least have a barometer to work off of when your changes to not work.  You can see what is breaking versus everything just not working.

Second, the RibbonForm may be firing things in a different sequence (pretty much guaranteed) than the standard SF dialog which could be having an effect as well.  So without me setting this up, I am not going to be able to tell you exactly what needs to happen in regards to the changes.

Third, and this is just a warning, I have experienced a number of reports from other SF users that the ribbon form (along with the DevExpress themes) has caused some performance issues the larger the application has become.  This has nothing to do with your issue, but I thought it prudent to at least point this out. 

Again, without me actually trying to set this up I will not be able to tell you exactly where your issue is.  However, I am farily confident that the instantiation of the ribbon form will be firing differently than the standard .NET dialogs which to me would be the first place I would start looking.

Jason Seidell
Jason Seidell
StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)
Group: Forum Members
Posts: 59, Visits: 180
Oops, forgot my attachment here it is.



Tongue

Jason Seidell

Programmer/Analyst

Infinedi

Attachments
SF Library changes.zip (137 views, 57.00 KB)
Jason Seidell
Jason Seidell
StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)
Group: Forum Members
Posts: 59, Visits: 180
I have included difference reports of what I modified in the SF library. I pretty much created copies of the BaseForm and the StandardForm classes. Appended '_wDXRibbon' to the class names. Then modified the BaseForm (both main and designer file) to inherit from DevExpress.XtraBars.Ribbon.RibbonForm. Then I changed the StandardForm (both main and designer file) to inherit from BaseForm_wDXRibbon. Otherwise I have not made any other significant changes to the library.



As for code samples I'm not really sure what you would be looking for. At this point the only code I have written is a call to the BO Fill method in the ParentFormLoading event, otherwise it's just add a new form, inherit from StandardForm_wDXRibbon, add a BO and add a maintenance tool strip. After I remove the tool strip everything works fine.



Would you need me to perhaps modify one of the sample SF projects and include a copy of my library source code???

Jason Seidell

Programmer/Analyst

Infinedi

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
Well, there could be a couple of things going on here.  First of all, I don't know what your base form code looks like.  Second, all of the logic that the MaintenanceFormToolstrip interacts with expects the BaseForm to be part of the inheritance string as it calls methods on the base form.  So without seeing an example or sample of this, it is going to be hard for me to give you step-by-step instructions to resolve this.  If you could post a sample that would make it the easiest to help you diagnose your problem.
Jason Seidell
Jason Seidell
StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)
Group: Forum Members
Posts: 59, Visits: 180
Ok I will try to give an abbreviated story of where I'm at and what I need.



For several months now I have been successfully developing using DevExpress suite 8.1 and StrataFrame 1.6.5. I have recompiled the SF libraries to support a BaseForm_wDXRibbon and StandardForm_wDXRibbon, using instructions posted elsewhere on the forum. I am able to successfully create forms using SF BOs and DevExpress controls. No problems here.



Today I tried to create a maintenance form that inherits from the StandardForm_wDXRibbon, now I get the following exception:



NullReferenceException

Object reference not set to an instance of an object.



Source : MicroFour StrataFrame UI



Stack Trace:

at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.HandleEditingStateChanged(EditingStateChangedEventArgs e)

at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.InitializeObject()

at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm_wDXRibbon.InitializeFormLoadObjects()

at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm_wDXRibbon.OnLoad(EventArgs e)

at System.Windows.Forms.Form.OnCreateControl()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl()

at System.Windows.Forms.Control.WmShowWindow(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

at System.Windows.Forms.ContainerControl.WndProc(Message& m)

at System.Windows.Forms.Form.WmShowWindow(Message& m)

at System.Windows.Forms.Form.WndProc(Message& m)

at DevExpress.XtraEditors.XtraForm.WndProc(Message& msg)

at DevExpress.XtraBars.Ribbon.RibbonForm.WndProc(Message& msg)

at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)

at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



If I step through the code the primary BO never has it's parent form loading event called, and I cannot capture this exception it always goes to the main SF unhandled exception function. If I remove the Maintenance Tool strip everything works fine (except now I need to create all the add, save, and navigate buttons) and the business object populates.



I'm really at a loss of how to resolve this, I double checked for rogue, outdated libraries, that all the source code between the SF forms and the with DX Ribbon forms are identical (except the class that they inherit from). I also get the same error if I click on any of the buttons on the tool strip, which leads me to believe the invalid reference is to the primary business object on the form.



You can repeat this behavior by creating a new standard SF form, then go to the designer code and change the inherits statement to StandardForm_wDXRibbon, then add a maintenance tool strip and any Business Object. After removing the tool strip the invalid reference exception will go away.



Thanks a many,



Jason

Jason Seidell

Programmer/Analyst

Infinedi

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