Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hacking objects classes
Message
De
18/02/2016 08:29:15
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
18/02/2016 05:03:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01631600
Message ID:
01631664
Vues:
45
>>I know of no explicit tool
>>
>>but
>>USE your_frx
>>
>>replace CLASS with ctargett FOR CLASS=='OldCLASS' and BASECLASS='TEXTBOX' 
>>use
>>compile classlib your_frx
>>
>>is fast enough
>
>You could do that, but you cant see the context and if you make a mistake you don't have an easy way to compare with the previous state what could be wrong and then you must start again from scratch using a copy, so this is one of the benefits of doing this replace in plain text with any editor, it is safer and you can visually see what are you changing in the correct context as PRG-like code, easy enough to understand for any programmer.

That is a matter of taste, need and skill.

I don't need to see things happen on a replace.
If you mistakenly change your text represenation and create the vcx/scx, you need to start from backup as well.

I can read a vcx, so it's much more easy to do that on vcx base. On a vcx I can do a replace / update that will specificly change records where on a text based search and replace the context might be much harder to check.
At least I think a conditional replace is more easy to express in a replace / update then in a search. Like to give me the search command for:
change class of textbox, but only if textbox is class xyz and the class containing it is a container
I can do that with a single SQL UPDATE, but how I should see the class of an object that is several hundred lines below DEFINE CLASS on an text editor is a complete riddle to me.

I have done this over and over, recursing through directory tree on that. Last time was introducing of git as my frame needs to move in the directory tree.

@Denis
I have a tool (builder) where I can select multiple objects in a container to change classes. It's a copy from UT downloads I guess. Or was a builder it shipped with VFP and I have altered it to my needs?. Long ago that. But that is not that reliable and can crash a form, so I'm reluctant to hand it to somebody else.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform