General information
Category:
The Mere Mortals Framework
Kevin,
I tried your suggestion regarding the SetAccessXXXX method and the problem did not go away.
Let me review.
I have a clistobjmaintenance form with 9 pages. I provide security for each complete page except page 1 and page 2. On page 2 I have two containers, each containing a number of controls. On page 2 security is not set for the page but for each container.
I have a security level of Readonly on one container on page 2 and Full on the other container. I also have the security level on page 3(security set for the full page) set to Readonly.
I run the application and select an entry from page 1, click on page 2 and all is OK. The containers appear as they should and the OK and Cancel buttons are enabled.
I click on page 3 (this is the page where the security for the entire page is set to readonly) and everything is ok on this page.
I click back to page 2 and the OK button is disabled and the Cancel button is enabled.
I traced the problem to the uienable method of cmdOKMaint in the KCustCtl.vcx and the refresh method of the form. When I click on page 3 (which is readonly) the following line of code in cmdOKMaint.uienable fires because the page is readonly.
if This.lReadOnly and Thisform.lAllowsave
thisform.lAllowSave = .F.
endif
When I click on page two the same method fires and this time 'Thisform.lAllowsave' is .F. Then the form refresh method fires for the cmdOKMaint button.
IF DODEFAULT()
IF TYPE('ThisForm.lAllowSave') == 'L'
IF This.lReadOnly
This.Enabled = .F.
ELSE
This.Enabled = ThisForm.lAllowSave
ENDIF
ENDIF
ENDIF
This button is not readonly but 'Thisform.lAllowsave' is still .F. from page 3.
This.enabled = thisform.lallowsave fires. The OK button on page 2 is then disabled. Apparently thisform.lAllowSave is not getting reset.
Am I doing something wrong or did I miss something or ??????
There is no custom code in any of the OK or cancel buttons
I am using vfp7.0 and MM7.0.
Thanks for the help.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only