Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically adding controls at runtime problem
Message
De
05/11/1998 16:25:20
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
 
 
À
05/11/1998 09:44:34
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00154801
Message ID:
00155014
Vues:
20
Kevin,

I found the problem. In the New button you call the cBizObjMaintBaseForm.New() in which you clear all the UIEnabler.lActivated properties in each page of the pageframe. In the cPageFrame.ClearUIEnablerlActivated method you clear the lActivated alright, but you don't check to see if the container has already been created.

I replaced the old code in the cPageFrame.ClearUIEnablerlActivated method with:

LOCAL loPage

FOR EACH loPage in This.Pages

IF TYPE("loPage.cntControls") = "O"
loPage.RemoveObject(loPage.cntControls.Name)
ENDIF
loPage.UIEnabler1.lActivated = .F.
ENDFOR

HTH

Rex


>All,
>
>I am having a problem with the cBizObjMaintenanceForm when I have a container for my controls on page 2. If I have selected page2 and then go back to page1 and add a new record, I get an error:
>
>1771 - A member object with this name already exists
>
>The framework is not aware that the container on page2 is already there and is attempting to create another.
>
>The problem also occurs in the demo app in the cUsersForm class if you change the nGoToPageOnNew to 4
>
>Has anyone experienced this behavior, and if so what is the solution
>
>TIA
>
>Rex
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform