Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private datasession issues..
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Private datasession issues..
Divers
Thread ID:
00153491
Message ID:
00153491
Vues:
79
Hello,

We are using VisualFoxPro 6.0 at the moment. We have defined an object named oMethod where we have added methods which we use in our entire application (like oMethod.UseTable()). We create this object everytime we start the application so we always have access to the methods in an easy way.

We created a form which is a PrivateDataSession. At first there didn't seem to be any problems. But when we moved further along with creating the form we noticed that some things went wrong. In our main procedure file we have alot of SET commands (like SET TALK OFF). When we checked these SET commands we noticed that they didn't apply to the PrivateDataSession form. All the settings where gone. So we decided to add a method to our oMethod object which had all the SET commands we used in the main PRG file. When we called this method in the LoadEvent of our form (like oMethod.InitSet()) nothing happened. We also tried using our own USE method (oMethod.UseTable("tablename")) but NO table was USEd and we could not SELECT it. After this we created a simple procedure file where we put all the SET commands and the USE method. And yes. They worked!

So we came to the conclusion that methods which cover tables and settings defined in an object are not useable in a PrivateDataSession.

Since we often use PrivateDataSession forms we are faced with a dilemma. We want to be as ObjectOriented as possible. But this way we are forced to use procedure files which cover tables and settings.

So in short: What is wisdom:

- Create a procedure file with all the procedures we use (replace the oMethod with is) or
- Keep our current way of working and using an object where we put all our methods. If so, then how do we solve the problem mentioned above?

Thanks for your time!
---
Greetings,

Michiel Willems
Willems Advies & Automatisering

E-Mail: willems@automatisering.nu
Website: www.automatisering.nu
ICQ: 10430590
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform