Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removeobject does not remove
Message
From
11/01/2012 06:37:43
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01532655
Message ID:
01532722
Views:
41
this is how it's created. the strange thing even the visible=.f. does not have any effect!
	IF NOT PEMSTATUS(THISFORM, [cntFILENOTE], 5)
		THISFORM.NEWOBJECT([cntFILENOTE], [cntFILENOTE], FULLPATH([modules\vCPR5.vcx]))
		THISFORM.cntFILENOTE.LEFT	= 160
		THISFORM.cntFILENOTE.TOP	= 264
		THISFORM.cntFILENOTE.HEIGHT = THISFORM.HEIGHT - 264
		THISFORM.cntFILENOTE.ANCHOR	= 15
*!*			THISFORM.cntFILENOTE.REFRESH()
		THISFORM.cntFILENOTE.VISIBLE = .T.
	ENDIF
Peter

>>i have the following code to remove a container object when not needed anymore:
>>
>>IF PEMSTATUS(THISFORM, [cntEmployer], 5)
>>	thisform.cntEmployer.VISIBLE=.f.
>>	thisform.RemoveObject([cntEmployer])
>>ENDIF 
>>
>>
>>no error but the object deas not get removed.
>>any thoughts?
>>
>>Thanks
>>
>>
>>Peter
>
>What debug said?
>Did cntEmployer is a member of thisform or any other container?
>How about to use quotes instead of square brackets?
>
>SET ASSERT ON
>ASSERT PEMSTATUS(THISFORM, "cntEmployer", 5) MESSAGE "cntEmployer did not exists"
>
>IF PEMSTATUS(THISFORM, "cntEmployer", 5)
>   thisform.cntEmployer.VISIBLE=.f.
>   thisform.RemoveObject([cntEmployer])
>ENDIF
>
Peter Cortiel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform