Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ToolbarButton Bug
Message
De
17/07/1998 17:59:40
Jan Tervonen
Mammography Reporting System
Seattle, Washington, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
ToolbarButton Bug
Divers
Thread ID:
00118833
Message ID:
00118833
Vues:
34
We just completed upgrading the Mere Mortals framework from Version 3.01 to 3.02. When running our application, an error occurs when opening a form that has an associated toolbar. I traced the problem to a line of code in the SetEnabled( ) method within the superclass cToolBarButton (ctoolbar.vcx). Part of the method reads:

DO WHILE !EMPTY(lcMenuBars)
lnCommaPos = AT(',', lcMenuBars)
lnLength = IIF(lnCommaPos > 0, lnCommaPos, LEN(lcMenuBars))
lcBar = LEFT(lcMenuBars, IIF(lnCommaPos = 0, lnLength, lnLength - 1))
lcMenuBars = SUBSTR(lcMenuBars, lnLength + 1)
lcObjectPath = lcObjectPath + ALLT(lcBar)
IF !EMPTY(lcMenuBars)
lcObjectPath = lcObjectPath + '.oPopup.'
ENDIF
ENDDO

The error occurs on the 5th line in the above code when lnLength = LEN(lcMenuBars) and the SUBSTR( ) method tries to access characters beyond the length of the string lcMenuBars. Interestingly, this code has not be modified from the last version and it does not produce the same error. I've temporarily fixed the problem by setting lcMenuBars = "" when lnLength = LEN(lcMenuBars), and the application seems to work fine.
Jan
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform