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
We heard you the first time Dave ...
Paul
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Dave Crozier Sent: 06 January 2017 14:20 To: profoxtech@leafe.com Subject: New Year Brain Teaser...
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
[excessive quoting removed by server]
On 06/01/2017 14:19, Dave Crozier wrote:
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.
Hi Dave,
What is the structure of the table that you scatter from? Just wondering if there are any numeric or other fields in it and you are trying to use one as a controlsource.
I do something similar on some forms but in the init I do
SCATTER NAME thisform.oData MEMO BLANK
then the real scatter is done elsewhere for a new record.
Peter
We will be exhibiting in the following cities:
Paris: Who's Next Friday Jan 20 - Monday Jan 23.
London: Pure Sunday Feb 12 - Tuesday Feb 14.
Las Vegas: Project Tuesday Feb 21 - Thursday Feb 23.
This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.
www.whisperingsmith.com
Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR. Tel:0161 831 3700 Fax:0161 831 3715
London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960
Peter Cushing wrote on 2017-01-06:
On 06/01/2017 14:19, Dave Crozier wrote: 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.
Hi Dave,
What is the structure of the table that you scatter from? Just wondering if there are any numeric or other fields in it and you are trying to use one as a controlsource.
I do something similar on some forms but in the init I do
SCATTER NAME thisform.oData MEMO BLANK
then the real scatter is done elsewhere for a new record.
Peter
Dave,
Do you have any BindEvent() or Try...Catch in your code?
I have a feeling the SCATTER is just a straw that breaks the real problem.
Tracy Pearson PowerChurch Software
No try catch or bindevent anywhere.... so still non the wiser.... 50% of the way to building it from scratch anyway and so far with incremental testing it is working fine, so I think it is just one of those things...
I will take a copy of the form in error though and hack the scx to un subclass it and see if that works.
Oh well, it's weekend so I can rest on Sunday, just like God I suppose!!!
Have a great weekend fellow Foxers!
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Tracy Pearson Sent: 06 January 2017 15:59 To: profox@leafe.com Subject: RE: New Year Brain Teaser...
Peter Cushing wrote on 2017-01-06:
On 06/01/2017 14:19, Dave Crozier wrote: 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.
Hi Dave,
What is the structure of the table that you scatter from? Just wondering if there are any numeric or other fields in it and you are trying to use one as a controlsource.
I do something similar on some forms but in the init I do
SCATTER NAME thisform.oData MEMO BLANK
then the real scatter is done elsewhere for a new record.
Peter
Dave,
Do you have any BindEvent() or Try...Catch in your code?
I have a feeling the SCATTER is just a straw that breaks the real problem.
Tracy Pearson PowerChurch Software
[excessive quoting removed by server]
On 2017-01-06 11:08, Dave Crozier wrote:
No try catch or bindevent anywhere.... so still non the wiser.... 50% of the way to building it from scratch anyway and so far with incremental testing it is working fine, so I think it is just one of those things...
I will take a copy of the form in error though and hack the scx to un subclass it and see if that works.
Oh well, it's weekend so I can rest on Sunday, just like God I suppose!!!
Have a great weekend fellow Foxers!
Dave
Any grids that are "losing their mind" since the underlying cursor for them may be regenerated?
On 2017-01-06 16:43, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2017-01-06 11:08, Dave Crozier wrote:
No try catch or bindevent anywhere.... so still non the wiser.... 50% of the way to building it from scratch anyway and so far with incremental testing it is working fine, so I think it is just one of those things...
I will take a copy of the form in error though and hack the scx to un subclass it and see if that works.
Oh well, it's weekend so I can rest on Sunday, just like God I suppose!!!
Have a great weekend fellow Foxers!
Dave
Make sure you release the instance of thisform.oData before releasing/unloading the form too.
Are you releasing the oData object before releasing the form?
On Fri, Jan 6, 2017 at 9:19 AM, Dave Crozier DaveC@flexipol.co.uk wrote:
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]
Ted, No but what I have done is now created a new base form (non subclassed) which works fine with the identical coding so there is something going astray with in the subclassing somewhere.
The extra subclassed events are only a "set talk off" and some other simple "set..." commands in the load, a borderstyle setting in the init and an embedded button on the form who's click event does the form release.
Even if I override the load and init with my own code the error still happens using the subclassed form and there is nothing else in there.
I think that this error is one of those that you can't recreate and rebuilding the form from scratch will make the problem go away.... I have spent far too long today on this so recreation it is.... after all if God could do the world in 6 days then one form will be a breeze! ;-)
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Ted Roche Sent: 06 January 2017 15:46 To: profox@leafe.com Subject: Re: New Year Brain Teaser...
Are you releasing the oData object before releasing the form?
On Fri, Jan 6, 2017 at 9:19 AM, Dave Crozier DaveC@flexipol.co.uk wrote:
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]
Dne 6.1.2017 v 15:19 Dave Crozier napsal(a):
Gentlemen, A bit of a problem here and I don't know what is causing it:
- The result - a dreaded C5 error from VFP9
Wrong construction like
WITH .. RETURN .. ENDWITH
can fire C00005
- 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]
Thanks everyone for your input.
Just as I thought it was just one of those things and re-generating the form from scratch resulted in the whole thing working.
I hate it when this happens but tracing why is secondary to getting the form working so I have saved all the non-working system for later analysis.
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Dave Crozier Sent: 06 January 2017 14:20 To: ProFox Email List profox@leafe.com Subject: New Year Brain Teaser...
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
[excessive quoting removed by server]