Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reference to thisform not working ?
Message
De
10/11/2004 15:59:49
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
10/11/2004 11:07:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00960020
Message ID:
00960210
Vues:
12
>I add a container object to a page in a pageframe on a screen like this:
>
>
>WITH THISFORM
>	IF .UseInternal
>		.pgf1.ACTIVEPAGE=4
>		WITH .pgf1.page4
>			IF pemstatus(THISFORM.pgf1.page4,"o1",5)
>				THISFORM.pgf1.page4.REMOVEOBJECT("o1") 			
>                        ENDIF
>			.NEWOBJECT("o1","cntCarrierPage","modules\vCPR3b")<----------------------
>
>			.o1.VISIBLE=.T.
>		ENDWITH
>	ELSE
>
>
>one of the objects in the container is a save button which invokes the containers save method:
>
>...
>	THISFORM.oLINKSCT.DATA.UpdateFromCursor()
>
>....
>
>
>
>this code erros saying not contained in a form object.
>I can't figure out why. THISFORM.oLINKSCT is an business object created in the load method of the form.
>
>what am I doing wrong???

Is this happening while the object is still being instantiated? I.e., is this called from something's init? Then it could be Thisform still doesn't exist at the time. The best way to check this is to have a breakpoint before the line which errors out, and then just put Thisform into the watch window. If it doesn't show as an object, that's it.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform