Errors with New Base Class (Devexpress)


Author
Message
Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
I've changed the BaseForm.vb

as

Public Class BaseForm
        Inherits MyBaseForm
        Implements MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl

MyBaseForm is inhereted from Devexpress XtraForm.

I 've got error message below in design time when SimpleButton (Devexpress wrapped) object were dropped on my form. My form is based on StandartForm which is based on my changed BaseForm. With Textedit Object there is no similar error.

"The object that the business object has been dropped on must be implement
MicroFour.strataFrame.UI.Windows.Forms.IcontainerControl"

IContainerControl Interface is implemented on baseform class but is not root (base class) now, Do I implement this interface on my base class ?

I've tried to set Business Object property of text control, I couldn't see BusinessObject in the list.

 


Replies
Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
The second scenario ;

BaseForm was changed to be inhereted from Devexpress XtraForm. I ve developed a test form and tested it. Testing and functionality was successful.

Then, Base form was changed to be inhereted from MyBaseForm. I've got the error messages below. (Base and UI Dlls are included in the projects)

The type 'MicroFour.StrataFrame.UI.Windows.Forms.IBusinessBindable' is defined in an assembly that is not referenced. You must add a reference to assembly 'MicroFour StrataFrame Base, Version=1.6.0.0, Culture=neutral, PublicKeyToken=99fe9917f71608a7'. 

The type 'MicroFour.StrataFrame.UI.Windows.Forms.IInitializeBusinessObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'MicroFour StrataFrame UI, Version=1.6.0.0, Culture=neutral, PublicKeyToken=99fe9917f71608a7'. 

The type 'MicroFour.StrataFrame.UI.ILocalizable' is defined in an assembly that is not referenced. You must add a reference to assembly 'MicroFour StrataFrame Base, Version=1.6.0.0, Culture=neutral, PublicKeyToken=99fe9917f71608a7'. 

The type 'MicroFour.StrataFrame.UI.IInitOnFormLoad' is defined in an assembly that is not referenced. You must add a reference to assembly 'MicroFour StrataFrame Base, Version=1.6.0.0, Culture=neutral, PublicKeyToken=99fe9917f71608a7'. 

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
Ertan,

First, it would be my recommendation to leave BaseForm alone.  There is a lot of logic in this class and by you changing you can break the entire framework as it relates to form interaction.  If you want to have the DevExpress XtrataForm as a base class, then create an entirely different class and copy the code from the BaseForm and implement the logic that way. 

Second, the reference exceptions you are getting are not SF related...but .NET related.  Check your references and make sure that if you select the reference that the path is pointing to viable SF reference....also, since you are changing the SF source code you forcing this error yourself since you changed the BaseForm, rebuilt, and more than likely did not get out.  By changing the BaseForm class you are going to inherantly break a number of other classes and we will not be able to support the downstream effects that this may cause.

Third, what you are trying to do is not an SF related issue.  As you know we are always willing to give suggestions and help where we can on items outside of SF, but making changes to the source code in this fashion is a really bad ida and something that we do not even do within out medical software.  This is why should should do this OUTSIDE of the framework source code.

Finally, I created a sample for you on how to do this.  I also changed the Business assembly to expose two Friend methods to make this easier for you.  This should be enough to get you going...keep in mind that all of this really had nothing to do with SF...it was all about inheritance and .NET.  I just made some changes to reduce the forum chatter and get you going more quickly.

You will need to drag the Business assembly into the GAC and copy it to the C:\Program files\common files\microfour\strataframe folder for the sample to work.

Attachments
XtraFormSample.zip (200 views, 235.00 KB)
MicroFour StrataFrame Business.zip (174 views, 383.00 KB)
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Thank for great sample.



I also changed the Business assembly to expose two Friend methods to make this easier for you.


Did you change this in latest release as well?



Thank you
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
Did you change this in latest release as well?

Yes.  This is in the latest build.  You can get it from here: http://forum.strataframe.net/FindPost14233.aspx .

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ertan Deniz - 17 Years Ago
Ertan Deniz - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Chan - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Ertan Deniz - 17 Years Ago
Ertan Deniz - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Ertan Deniz - 17 Years Ago
Ertan Deniz - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Ertan Deniz - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Ertan Deniz - 17 Years Ago
Ertan Deniz - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Chan - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search