Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ToolbarButton Bug
Message
From
17/07/1998 17:59:40
Jan Tervonen
Mammography Reporting System
Seattle, Washington, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
ToolbarButton Bug
Miscellaneous
Thread ID:
00118833
Message ID:
00118833
Views:
35
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
Next
Reply
Map
View

Click here to load this message in the networking platform