Gentlemen, A bit of a problem here and I don't know what is causing it:
1. The result - a dreaded C5 error from VFP9
2. The scenario:
Non Modal Form with private datasession and one table open in the session... I want to use a data object to hold data in and then use this object to populate various controls on the form.
Initially none of the controls have a controlsource property assigned and they are allocated programmatically at runtime in the init.
The Form has a property added called oData added at design time.
In the init of the form the oData property is assigned i.e.
Select <table> Scatter name Thisform.oData memo
What I ultimately want to do is the following: Thisform.txtText1.ControlSource = "Thisform.oData.Field1" ... for each of the form controls etc.
The exit button on the form simply releases the form and should return back to the development mode but it doesn't - simply throwing a C5 error every time.
I have now got the bones of the problem down to the init of the form and the click of the exit button and no runtime controlsource setup for the form controls, and have a simple blank form with no controls on it so they are not the problem.
I have even tried assigning the oData property at runtime in the init() with:
Thisform.AddProperty("oData", null) immediately before the scatter
...and a lot of other "potential get arounds" all to no avail.
If I leave out the scatter then the form loads and exits no problem but as I say throws a C5 on form clicking the exit button as soon as it hits the return after Thisform.release
Ideas please as this is now driving me potty!
Dave
Hi Dave,
Just in case: are you using something like this in your code?
WITH THIS (or THISFORM or some object) (some code) *RETURN* => This kind of return before EndWith makes C5 happen sooner or later ENDWITH
Regards,
Fernando.-
2017-01-06 15:14 GMT+01:00 Dave Crozier DaveC@flexipol.co.uk:
Gentlemen, A bit of a problem here and I don't know what is causing it:
The result - a dreaded C5 error from VFP9
The scenario:
Non Modal Form with private datasession and one table open in the session... I want to use a data object to hold data in and then use this object to populate various controls on the form.
Initially none of the controls have a controlsource property assigned and they are allocated programmatically at runtime in the init.
The Form has a property added called oData added at design time.
In the init of the form the oData property is assigned i.e.
Select <table> Scatter name Thisform.oData memo
What I ultimately want to do is the following: Thisform.txtText1.ControlSource = "Thisform.oData.Field1" ... for each of the form controls etc.
The exit button on the form simply releases the form and should return back to the development mode but it doesn't - simply throwing a C5 error every time.
I have now got the bones of the problem down to the init of the form and the click of the exit button and no runtime controlsource setup for the form controls, and have a simple blank form with no controls on it so they are not the problem.
I have even tried assigning the oData property at runtime in the init() with:
Thisform.AddProperty("oData", null) immediately before the scatter
...and a lot of other "potential get arounds" all to no avail.
If I leave out the scatter then the form loads and exits no problem but as I say throws a C5 on form clicking the exit button as soon as it hits the return after Thisform.release
Ideas please as this is now driving me potty!
Dave
[excessive quoting removed by server]