Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CLEAR ALL within an event or method
Message
From
10/01/2013 18:48:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
CLEAR ALL within an event or method
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01562079
Message ID:
01562079
Views:
127
The helptext of the CLEAR command says:

Issuing CLEAR ALL within an event or method for an active control or object generates a Visual FoxPro error message.

This bothers me in this situation:
1 In the Init() of an object an error occurs.
2 The errorhandler offers the option to Abort.
3 The Abort has separate code for the runtime situation and the development situation.
4 In the development situation I have a line CLEAR ALL.

It generates an error without a number: ''Cannot clear the object CMDBROWSE because it is in use."

I have unsuccesfully tried several techniques to release the form that contains the object beforehand, for example:
for each loForm in _screen.forms
	if lower( m.loForm.class ) = "viafrm_viajob"
		m.loForm.destroy()
		m.loForm.release()
	endif
next
release loForm
Advice is welcome.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Next
Reply
Map
View

Click here to load this message in the networking platform