Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Thisform.release() from form's DE
Message
 
 
To
01/06/2004 22:43:01
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00908137
Message ID:
00909271
Views:
10
Dennis,

That's not the way it works, form level properties are set based off the values of the class and then the overridden values of the form are applied to the properties and the DE starts opening tables, then form objects construct. I just tried this in VFP6, created a baseclass form, created a custom property lDEError and put code in two methods:
* form.Load()
if ( this.lDEError )
   messagebox( "can't run" )
   return .f.
endif

* DE.BeforeOpenTables()
thisform.lDEError = ( gcErrorTest == "bad" )
I used the gcErrorTest memvar only to be able to easily test this. and it works as expected. Set gcErrorTest = "" in the command window and run the form it appears. Set gcErrorTest = "bad" and you get the messagebox and the form doesn't load.

>Actually i started out using a form property for this - like TablesOpenedOK. After an error is trapped in DE, I update ThisForm.TablesOpenedOk WITH .F.
>
>But when it's evaluated in the Form's Load, it still is true! Hence, i 'settled' for a public memvar.
>
>I tracked program flow via Debugger... the Error is trapped alright, but when flow reaches Form.Load the property seems to be 're-initialized'...
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform