Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Large Application Doform() vs AbstractFactory
Message
De
19/06/2002 16:36:54
 
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00623680
Message ID:
00670290
Vues:
22
Kevin,

On the topic of multiple application projects integrated into one, here is what I have determined is working for me and what is not.
1) Using a common Main project with a abstract factory for calling the other application form classes, I can successfully use doform(goapp.oICSFactory.GetClassName(‘AnyFormIWant’)) and it will properly instantiate any of my form classs if all the classes making up the forms are contained in the form class’s classlib or are part of the main application’s framework classes.

2) However, If I have a form class that has used classes from other classlibs, with their only identified reference being “I dropped them on the form”, they won’t instantiate even though they are all compiled into my AnyPackage.app file. The form causing the error in this example is in the same classlib and called from a form class (instantiated successfully) containing a clistobjedit class.

3) Usually I’ll see the following message:
------------------------------------------------------------------
Error # 1733
Message: Class definition JOURNALTYPESENVIRONMENT is not found.
Line: 42
Code: This.oDataEnvironment = CREATEOBJECT(This.cDataEnvironment,toParentObj.tlCreateCursorsFromSchema )
------------------------------------------------------------------
Method: createdataenvironment
Object: JournalTransEditForm.pgfbizobj.page2.jounraltypesobj1.odeloader

What I need resolve is this:
1) Have I violated some convention that is keeping this architecture from working, and If so, how should I change what I’ve done? I am using sourcesafe so I have separate classes for each group of (bizobj, related forms and data) and I have seperate projects for each application.
2) If the multiple application architecture was is only expected to work when I have only used Aforms,Adataenv, etc so everything is in the same libraries, will I be required to maintain two arrangements one for the development mode and one for multiple application deployment?

What is your comment and advice?

Thanks,

Gary Pike.

>Gary,
>
>>If you review the rest of the original message, it says exactly your point, which I agree is the way to go. Not to repeat my entire orgiginal message, how are we going to have the abstactfactory instantiate classes when the framework is using doform to instantiate classes within itself between related forms. Doform assumes all referenced classes have their liabraries "set class lib'ed, which will not be the case.
>
>Sorry for the misunderstanding! As long as at least one class has been instantiated from the external APP or EXE by means of the Abstract Factory, VFP will automatically be able to find all other classes in that same APP or EXE. This is because the Abstract Factory issues a SET CLASSLIB TO IN when it instantiates the first class requested from an external APP.EXE.
>
>Regards,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform