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