Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the parent class of an existing form
Message
De
26/11/1998 12:55:42
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
26/11/1998 12:54:05
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00161804
Message ID:
00161811
Vues:
22
>>>I have an app with forms based on the default VFP base forms. Now that I know more about OOP, I want to change these forms so they are based on a subclass of the VFP base form. Is there a way to do this without having to copy the methods and objects in each existing form to a new one, or is there a low level shortcut for doing this?
>>>
>>>Mon
>>I liked the "low level" idea :) It could be done via "medium level". Open the form (.scx) as a table, find the object with baseclass = "Form", change Class, Classloc properties.
>>Cetin
>Batch code (make backups first:)
lparameters tcClass, tcClassLoc
>lcFormDir = getdir()
>if empty(lcFormdir)
> return
>endif
>nFiles = adir(aSCX,lcFormDir+"*.scx)
>for ix = 1 to nFiles
<del>  use (aSCX[ix])</del>
  use (aSCX[ix,1])
>  replace class with tcClass, classloc with tcClassLoc ;
>   for baseclass = "Form"
>  use
>endfor
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform