Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do we have access to the Class Browser Source Code?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00623493
Message ID:
00624046
Vues:
11
>A couple of weeks ago I sent a bug report to MS regarding the Class browser. Jim Saunders confirmed it to be a bug and so I thought I might be able to solve the problem if I could look at the source code and see what was going on. The basic problem is that I get a GPF when I double click on some items in the class Browser after I run a form that contained those items. The problem is related to the ClearClass method. In my case it had to do with instance programming of grids which I have now stopped. However, it nows happens with other controls.
>What is the name of the class browser source code file?

That would be a bug in the CLEAR CLASS command which the Class Browser uses, not a Class Browser bug. The Class Browser simply uses the CLEAR CLASS command, so you may or may not be able to work around this. The source files for the Class Browser are in browser.prg and browser.scx/sct. The ClearClass method is on the form level in browser.scx/sct, see code below:


PROCEDURE clearclass
LPARAMETERS tlClearAll
LOCAL lcObjName,lcClass,lnChildCount,lnCount
LOCAL lnLastSelect,lnRecNo

IF NOT this.lBrowser OR NOT USED(this.cAlias)
RETURN .F.
ENDIF
lnLastSelect=SELECT()
this.RefreshRecNo
SELECT (this.cAlias)
lnRecNo=IIF(EOF() OR RECNO()>RECCOUNT(),1,RECNO())
lcObjName=LOWER(MLINE(ObjName,1))
IF NOT EMPTY(lcObjName) AND NOT lcObjName==LOWER(MLINE(BaseClass,1))
CLEAR CLASS (lcObjName)
ENDIF
lcClass=LOWER(MLINE(Class,1))
IF NOT EMPTY(lcClass) AND NOT lcClass==LOWER(MLINE(BaseClass,1))
CLEAR CLASS (lcClass)
ENDIF
lnChildCount=VAL(MLINE(Reserved2,1))-1
FOR lnCount = 1 TO lnChildCount
SKIP
lcClass=LOWER(MLINE(Class,1))
IF NOT EMPTY(lcClass) AND NOT lcClass==LOWER(MLINE(BaseClass,1))
CLEAR CLASS (lcClass)
ENDIF
ENDFOR
IF tlClearAll
FOR lnCount = 1 TO this.nClassCount
lcClass=this.aClassList[lnCount,1]
IF EMPTY(lcClass) OR "."$lcClass OR lcClass==this.aClassList[lnCount,8]
LOOP
ENDIF
CLEAR CLASS (lcClass)
ENDFOR
ENDIF
SELECT (this.cAlias)
GO lnRecNo
SELECT (lnLastSelect)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform