Index
2017-01-06 08:19Dave Crozier : New Year Brain Teaser...
2017-01-06 08:20Paul Newton : RE: New Year Brain Teaser...
2017-01-06 09:05Peter Cushing : Re: New Year Brain Teaser...
2017-01-06 09:45Ted Roche : Re: New Year Brain Teaser...
2017-01-06 09:54Dave Crozier : RE: New Year Brain Teaser...
2017-01-06 09:59Tracy Pearson : RE: New Year Brain Teaser...
2017-01-06 10:08Dave Crozier : RE: New Year Brain Teaser...
2017-01-06 15:43mbsoftwaresolutions@mbsoftwaresolutions.com: RE: New Year Brain Teaser...
2017-01-06 16:27Jan Bucek : Re: New Year Brain Teaser...
2017-01-08 06:08mbsoftwaresolutions@mbsoftwaresolutions.com: RE: New Year Brain Teaser...
Back to top
New Year Brain Teaser...

Author: Dave Crozier

Posted: 2017-01-06 08:19:33   Link

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

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/18725B8CD2D5D247873A2BAF401D4AB2A4424CCD@EX2010-A-FPL.FPL.LOCAL

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 Dave Crozier
Back to top
RE: New Year Brain Teaser...

Author: Paul Newton

Posted: 2017-01-06 08:20:51   Link

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]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/9A8106AFB0EF9B44B69045C4448935A20141283CCA@NLBAWEXMBX1.infor.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 Paul Newton
Back to top
Re: New Year Brain Teaser...

Author: Peter Cushing

Posted: 2017-01-06 09:05:51   Link

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

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/eb95bc05-5374-6882-2bda-9e2e044b12aa@whisperingsmith.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 Peter Cushing
Back to top
Re: New Year Brain Teaser...

Author: Ted Roche

Posted: 2017-01-06 09:45:49   Link

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:

>

> 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]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/CACW6n4sWX24CMSjXEFA=NTAw8ey38r_UTTUUSyR4sFeaQGAoSw@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 Ted Roche
Back to top
RE: New Year Brain Teaser...

Author: Dave Crozier

Posted: 2017-01-06 09:54:37   Link

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:

>

> 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]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/18725B8CD2D5D247873A2BAF401D4AB2A4425088@EX2010-A-FPL.FPL.LOCAL

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 Dave Crozier
Back to top
RE: New Year Brain Teaser...

Author: Tracy Pearson

Posted: 2017-01-06 09:59:06   Link

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

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/000001d26835$cf7fa490$6e7eedb0$@powerchurch.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 Tracy Pearson
Back to top
RE: New Year Brain Teaser...

Author: Dave Crozier

Posted: 2017-01-06 10:08:30   Link

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]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/18725B8CD2D5D247873A2BAF401D4AB2A44250D8@EX2010-A-FPL.FPL.LOCAL

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 Dave Crozier
Back to top
RE: New Year Brain Teaser...

Author: mbsoftwaresolutions@mbsoftwaresolutions.com

Posted: 2017-01-06 15:43:16   Link

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?

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/df8da0ce2a125109291a36bcff4d641d@mbsoftwaresolutions.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 mbsoftwaresolutions@mbsoftwaresolutions.com
Back to top
Re: New Year Brain Teaser...

Author: Jan Bucek

Posted: 2017-01-06 16:27:58   Link

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:

>

> 1. The result - a dreaded C5 error from VFP9

Wrong construction like

WITH

..

RETURN

..

ENDWITH

can fire C00005

>

> 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]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/2e77d38a-82f7-dd4a-0b66-65681c669852@post.cz

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 Jan Bucek
Back to top
RE: New Year Brain Teaser...

Author: mbsoftwaresolutions@mbsoftwaresolutions.com

Posted: 2017-01-08 06:08:04   Link

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.

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox

OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/a3f3538d007e75189b0effb344e64022@mbsoftwaresolutions.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2017 mbsoftwaresolutions@mbsoftwaresolutions.com