At 07:08 2018-11-07, Ted Roche tedroche@gmail.com wrote:
On Wed, Nov 7, 2018 at 5:57 AM Dave Crozier DCrozier@flexipol.co.uk wrote:
Unknown to me after all these years, the set default to command has an effect on the whole of the VFP thread not just the DataSession you are in.
To quote my co-author, "Computer language purists object to SET commands for a pretty straightforward reason: the formation of the infinite-state machine. Although that sounds cool,..." ( https://www.tedroche.com/hackfox7/s4g126.html)
That URL was wrong in your post as it included the closing paren. Oddly, Eudora excluded it in this reply.
SETs often have global effects which make their local use frustrating.
I have not found it so, but one must be careful.
If I change a global setting SET (as opposed, say, to a SET ORDER), I either set the setting back as soon as I can or I have a procedure for doing the modified function requiring the different SET value. One must be careful about this stuff.
Three things:
- If you were rewriting the app, you'd store a "Data Directory" in your
global settings table and precede all your file open commands with that. That makes it INCREDIBLY easy to have a test mode that just switches that setting. But you're not re-writing your app, so...
I did that for a few programs where I needed to get to a different set of data. I am glad that it was only a few.
[snip]
Sincerely,
Gene Wirchenko
On Wed, Nov 7, 2018 at 2:13 PM Gene Wirchenko genew@telus.net wrote:
That URL was wrong in your post as it included the closingparen. Oddly, Eudora excluded it in this reply.
Mayhaps your email reader parsed it wrong, as I sent plain text and it works fine on my end.
SETs often have global effects which make their local use frustrating.
I have not found it so, but one must be careful.
Well, OP had a classic case, where the SET is saved, changed, and reset in a very small snippet of code, but if other code runs in the meantime (timers, in that case, or menu code or LostFocus events) that depend on the global setting, confusion results.
Gene, The problem if you are using GetFile() is that if you use the set default then open the dialogue and then keep the dialogue open for a few seconds, any background process/thread will pick up the new default location before you set it back after you close the dialogue.
Dave Crozier Software Development Manager Flexipol Packaging Ltd.
﴾⚆ᨎ⚆﴿
Flexipol® Packaging Ltd T 01706 222 792 E DCrozier@flexipol.co.uk W https://www.flexipol.co.uk/ Follow us: Unit 14 Bentwood Road, Carrs Industrial Estate, Haslingden, Lancashire, BB4 5HH
This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. 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.
Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the risk of virus transmission through email and therefore any files sent via e-mail will have been checked for known viruses. However, you are advised to run your own virus check before opening any attachments received as Flexipol Packaging Ltd will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received.
It is the responsibility of the recipient to ensure that they have adequate virus protection.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Terms & Conditions: Notwithstanding delivery and the passing of risk in the goods, the property in the goods shall not pass to the buyer until the seller Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds payment in full of the price of the goods and all other goods agreed to be sold by the seller to the buyer for which payment is then due. Until such time as the property in the goods passes to the buyer, the buyer shall hold the goods as the seller's fiduciary agent and bailee and keep the goods separate from those of the buyer and third parties and properly stored protected and insured and identified as the seller's property but shall be entitled to resell or use the goods in the ordinary course of its business. Until such time as the property in the goods passes to the buyer the seller shall be entitled at any time -----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Gene Wirchenko Sent: 07 November 2018 19:13 To: profoxtech@leafe.com Subject: Re: GetFile() issue
At 07:08 2018-11-07, Ted Roche tedroche@gmail.com wrote:
On Wed, Nov 7, 2018 at 5:57 AM Dave Crozier DCrozier@flexipol.co.uk wrote:
Unknown to me after all these years, the set default to command has an effect on the whole of the VFP thread not just the DataSession you are in.
To quote my co-author, "Computer language purists object to SET commands for a pretty straightforward reason: the formation of the infinite-state machine. Although that sounds cool,..." ( https://www.tedroche.com/hackfox7/s4g126.html)
That URL was wrong in your post as it included the closing paren. Oddly, Eudora excluded it in this reply.
SETs often have global effects which make their local use frustrating.
I have not found it so, but one must be careful.
If I change a global setting SET (as opposed, say, to a SET ORDER), I either set the setting back as soon as I can or I have a procedure for doing the modified function requiring the different SET value. One must be careful about this stuff.
Three things:
- If you were rewriting the app, you'd store a "Data Directory" in
your global settings table and precede all your file open commands with that. That makes it INCREDIBLY easy to have a test mode that just switches that setting. But you're not re-writing your app, so...
I did that for a few programs where I needed to get to a different set of data. I am glad that it was only a few.
[snip]
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
Hi Dave:
I think that have a simple solution for the GetFile() problem. Try this:
oo = CreateObject("visualfoxpro.application") oo.DoCmd("cd 'c:\desa'") ? oo.Eval("getfile()") oo.Release()
Works ok and do not change main VFP default dir.
El jue., 8 nov. 2018 a las 15:38, Dave Crozier (DCrozier@flexipol.co.uk) escribió:
Gene, The problem if you are using GetFile() is that if you use the set default then open the dialogue and then keep the dialogue open for a few seconds, any background process/thread will pick up the new default location before you set it back after you close the dialogue.
Dave Crozier Software Development Manager Flexipol Packaging Ltd.
﴾⚆ᨎ⚆﴿
Flexipol® Packaging Ltd T 01706 222 792 E DCrozier@flexipol.co.uk W https://www.flexipol.co.uk/ Follow us: Unit 14 Bentwood Road, Carrs Industrial Estate, Haslingden, Lancashire, BB4 5HH
This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. 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.
Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the risk of virus transmission through email and therefore any files sent via e-mail will have been checked for known viruses. However, you are advised to run your own virus check before opening any attachments received as Flexipol Packaging Ltd will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received.
It is the responsibility of the recipient to ensure that they have adequate virus protection.
Terms & Conditions: Notwithstanding delivery and the passing of risk in the goods, the property in the goods shall not pass to the buyer until the seller Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds payment in full of the price of the goods and all other goods agreed to be sold by the seller to the buyer for which payment is then due. Until such time as the property in the goods passes to the buyer, the buyer shall hold the goods as the seller's fiduciary agent and bailee and keep the goods separate from those of the buyer and third parties and properly stored protected and insured and identified as the seller's property but shall be entitled to resell or use the goods in the ordinary course of its business. Until such time as the property in the goods passes to the buyer the seller shall be entitled at any time -----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of Gene Wirchenko Sent: 07 November 2018 19:13 To: profoxtech@leafe.com Subject: Re: GetFile() issue
At 07:08 2018-11-07, Ted Roche tedroche@gmail.com wrote:
On Wed, Nov 7, 2018 at 5:57 AM Dave Crozier DCrozier@flexipol.co.uk
wrote:
Unknown to me after all these years, the set default to command has an effect on the whole of the VFP thread not just the DataSession you
are in.
To quote my co-author, "Computer language purists object to SET commands for a pretty straightforward reason: the formation of the infinite-state machine. Although that sounds cool,..." ( https://www.tedroche.com/hackfox7/s4g126.html)
That URL was wrong in your post as it included the closing paren.Oddly, Eudora excluded it in this reply.
SETs often have global effects which make their local use frustrating.
I have not found it so, but one must be careful. If I change a global setting SET (as opposed, say, to a SET ORDER),I either set the setting back as soon as I can or I have a procedure for doing the modified function requiring the different SET value. One must be careful about this stuff.
Three things:
- If you were rewriting the app, you'd store a "Data Directory" in
your global settings table and precede all your file open commands with
that.
That makes it INCREDIBLY easy to have a test mode that just switches that setting. But you're not re-writing your app, so...
I did that for a few programs where I needed to get to a differentset of data. I am glad that it was only a few.
[snip]
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]