Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving classes
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00907673
Message ID:
00907888
Views:
6
You may try a cleanup program like this:
Close Databases All
Set Classlib To
Private cPacked
cPacked = 'Packed:'+Chr(13)+Chr(10)
clearlibs('.')
Messagebox(cPacked)

Function clearlibs
    Lparameters cdir
    Local i, laLib(1), loOrr As Exception
    i = 0
    cdir = Addbs(cdir)
    For i = 1 To Adir(laLib,cdir+'*.*','D')
        If Not Empty(laLib(i,1))
            If Not 'D' $ laLib(i,5)
                If Upper(Justext(laLib(i,1))) = 'VCX'
                    lcVcx = (cdir+laLib(i,1))
                    Clear Classlib (lcVcx)
                    Try
                        Use (lcVcx) Exclusive Alias clsLib
                        Copy To (Justpath(Dbf())+'\BackUp_'+Justfname(Dbf()))
                        Pack
                        cPacked = Textmerge('<<cPacked>><<lcVcx>><<CHR(13)+CHR(10)>>')
                    Catch To loerr
                        Messagebox(loerr.Message)
                    Endtry
                Endif
            Else
                If laLib(i,1) <> '.'
                    clearlibs(cdir+laLib(i,1))
                Endif
            Endif
        Endif
    Endfor
    Return
Glenn


>Hi,
>
>Right now I am working on a project which contains a lot of classlibraries. Every time I want to save my class, the old class in the claslibrary is deleted and the current one is addes to the classlibrary. How can I prevent foxpro to overwrite the class in the classlibrary instead of making backups of my old classlib?
>
>Sander Bouwmeester
Previous
Reply
Map
View

Click here to load this message in the networking platform