Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pemstatus???
Message
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:
00956068
Views:
9
Ahh, It's (PArent,Object,5)

That did it


Thanks



Peter
>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
Peter Cortiel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform