Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wouldn't it be cool if...
Message
De
20/02/2001 18:48:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Wouldn't it be cool if...
Divers
Thread ID:
00477849
Message ID:
00477849
Vues:
54
As I'm sitting here looking for something to do for a few minutes to relieve my brain from intensive coding, I'm wondering about two really cool possible features which, to the best of my knowledge, don't exist.

The first would be the ability to pass tables and cursors. Wouldn't it be very cool to have a function which could pass a table or cursor to an empty work area? How many times have you done complex logic to generate a cursor on the fly, and had to repeat it because of the issues with datasession swapping. I've created many of the above functions using datasession swapping, only to refactor them out after reading a number of opinions about switching datasessions in code. And yes, I know there is ADO which solves much of that need, but not everyone is a big fan of ADO either, and I'm prefer a native object oriented solution to a proprietary technology.

Sometimes, you want to keep all knowledge about data in a business object, so when the time comes to retrieve data to populate a listbox, you can create a "stupid" interface which asks for and gets a read-only cursor in the specified work area. Does such a thing already exist?

The next cool thing would be the ability to return arrays in functions (which brings up how great it would be to have pointers in VFP). I know one can pass arrays by reference, but I find that for me, that leads to code which is much more difficult to read, and thus to debug. I have so much code that returns arrays via reference and it frequently leads to subtly sloppy and complicated code.

I'm curious what others think of this - and ask that if I am being naive, and there are in fact ways to do these things, people gently inform me of my ignorance.

OK - back to work.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform