Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pemstatus???
Message
 
To
30/10/2004 08:35:21
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00956066
Message ID:
00956067
Views:
9
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform