Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pemstatus???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00956066
Message ID:
00956067
Vues:
10
This message has been marked as the solution to the initial question of the thread.
Hi Peter,

Try 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","cntClaimantPage","modules\vCPR3b")
			.o1.VISIBLE=.T.
		ENDWITH
But you can use TYPE() function:
if TYPE("THISFORM.pgf1.page4.o1.name")="C"
   THISFORM.pgf1.page4.RemoveObject("o1")
endif
MartinJ

>I need to add an object at runtime. How can I find out if the object already exists?
>The way I use pemstatus does not seem to work, neither does TRY/ENDTRY as below
>
>
>
>WITH THISFORM
>	IF .UseInternal
>		.pgf1.ACTIVEPAGE=4
>		WITH .pgf1.page4
>			try
>				THISFORM.pgf1.page4.RemoveObject("o1")
>			CATCH
>			ENDTRY
>			.NEWOBJECT("o1","cntClaimantPage","modules\vCPR3b")
>			.o1.VISIBLE=.T.
>		ENDWITH
>
>
>
>
>Thanks
>
>P
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform