Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Edit Memo Fields programatically
Message
De
15/07/2004 21:06:40
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
15/07/2004 02:58:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00924229
Message ID:
00924971
Vues:
9
> I agree with you completely that without a strict format for the memo field a different approach is needed. My idea was to show how simple it was to modify structured data in memo fields. A starting point, before the real world intrudes.

Sorry for being intrusive :).

> For me one of the great things about FoxPro is that there is usually a selection of alternatives to achieve the same goal and you have shown an approach to handling less structured data.

As the saying goes, "in Fox, it can be done in at least three ways, or it isn't worth doing at all".

> Another way would be to sprinkle the memo field with comment lines to bound the parts you want to change and use these as markers and then ... hmm.. its starting to sound a bit like XML to me.
>
> Then again you could bin the memo field method altogether and store the data in a text field of a table.

I've once had a request to handle arbitrary number of user-defined fields, and these would be defined at group level, i.e. some records would have these fields, and some would have those fields, and yet another group would have its own etc etc. The solution was simple: a memo with fieldname=value lines, pretty much like an ini file. In the entry form, I'd simply read the list of fields for the current group, build an array of containers (which had a label and a textbox in them), populate an array from the memo, set controlsource of the textboxes to array elements, show(). On save, just re-create the memo from the arrays. Worked like a charm.

> I'm told that FoxPro is pretty good at handling tables <s>

Doing quite well for a dead language, isn't it :)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform