Ertan Deniz
|
|
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. |
|
|
|
Ertan Deniz
|
|
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
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
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.
|
|
|
Ertan Deniz
|
|
Group: Forum Members
Posts: 163,
Visits: 493
|
I couldn't found any error, When I was testing changed BaseForm class inhereted from Devexpress XtraForm. But you are right. The change of source like this may be problem in the future and hard to follow. My problem is with my baseform (It is inhereted from XtraForm). It has logic implemented to serve our forms. I think We get the problems due to this hiyerarcy. I have tried many ways like re-implementing the IContainerControl in the sample form, Compiling strataframe source with my base dll. I've followed your instructions. Your sample does not work. I've got the error below : 'RemoveObjectFromInitOnFormLoad' cannot implement 'RemoveObjectFromInitOnFormLoad' because there is no matching sub on interface 'MicroFour.StrataFrame.UI.Windows.Forms.IContainerControl'.
|
|
|
Ertan Deniz
|
|
Group: Forum Members
Posts: 163,
Visits: 493
|
I've copied BaseForm and Standart Form. New BaseForm is inhereted from MyBase (Which is inheretd from Devexpress xtraForm). I've compiled succesfully without strong names (Because some of my related ddls does not have strong name). In my tests, I've used these dlls from bin directory not from Common files and GAC. (I've not copied them into common files and GAC) I've got nearly same errors. I think different versions of dlls from these places conflict each other. (May I have missing information) Is it necessary to put the dlls into gac and common files. I mean, May "My bin directory,Common files and GAC" be different? I ve also tested CRM sample with compiled dlls and I've got errors like 'unable to cast of object type 'BusinessObject' to Microfour..BusinessLayerBase'
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Ertan, There is not much else that I think that I can do for you here.....I spent nearly an hour the other day making changes to the framework and creating this sample for you which really has nothing to do with SF but DevExpress. We were not obligated to do this since you are trying to make changes to a core piece of the framework and we do not actually support the DevExpress XtraForm...but I wanted to help since we value your business. The problems that you seem to be fighting are simply namespace and inheritence issues (standard .NET programming). I have run the sample on several machines and it does in fact work....so I am not sure where you are running into your issue. You seem to be stuck on the IContainerControl implementation, but there is MUCH more that has to take place....and if you look at the sample I created for you, it does work. Even though I disagree with this approach that you are trying to take because as soon as we make a change to BaseForm you will not get this update....regardless, be sure that you are running on the 1.6.5 beta and then copy the attached business assembly into your GAC...I made changes specifically for you so that you could do this. I created a sample, made changes to the framework, and tried to make it as clear as I possibly could. I hope that you find your issue here as I am not sure that there is anything else I can say...sorry
|
|
|
Ertan Deniz
|
|
Group: Forum Members
Posts: 163,
Visits: 493
|
I've tried sample on the version 1.6.0 (Original Purchased copy) This may be the source of the error. I'm trying to find alternatif ways but all the forms must be inhereted from our baseform.
|
|
|
Ertan Deniz
|
|
Group: Forum Members
Posts: 163,
Visits: 493
|
Information Purposes only ;Your standart BaseForm or new baseform must be inhereted from our base form. Otherwise, The forms does not work in our application.This means minimal change on the framework code. There is no need to implement anything. I 've copied BaseForm to a NewBaseForm. Try to use NewBaseForm, I 've got cast error 'Framework is trying to cast with its baseform in ChildDialog.vb.'
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Again, you are fighting standard inheritance issues. If you just take the sample I gave you and inherit the MyBaseForm class off of YOUR base form instead of the DevExpress XtraForm then it should work...that is ALL that you should have to do!
|
|
|
Ertan Deniz
|
|
Group: Forum Members
Posts: 163,
Visits: 493
|
I've understand that my case was not SF related. (Inheretance Issues) Can I get the changes you make in the Business Dll ? Do these changes will be included in the new releases ? (Final build 1.6.5)
|
|
|