Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vfp throws command/initialization results as if SET TALK is ON 5

Status
Not open for further replies.

Rajesh Karunakaran

Programmer
Sep 29, 2016
549
MU
Dear friends,

I am seeing a weird problem. In one of my forms (its a POS screen), I am using good amount of images on buttons (both native buttons and my own button class). Sometimes, after clicking a button and invoking another form or especially when I print preview is invoked, values being manipulated in the program behind are thrown onto the UI. A sample is below.

Untitled_rml1zg.png


Interestingly, after getting this problem once just before a print preview, if I try once again after closing the preview window, it may not show the issue. It appears that, it's On and Off, randomly.

I already have TALK & ECHO OFF in my main/startup program. Now, to test this, I have given these SETs as OFF in my forms LOAD and even in Report Form's INIT etc. Still the problem persists. By the way, I am using Report Engine 90 in this form.

Could this be because of any missing clause in REPORT FORM... of Report Engine 90?

Anyone experienced something like this?
Any clue?

Rajesh
 
Do you use a report listener? I know there was a bug leading to such output with a report listener.

Even if, you should be able to defend any form not having such output by setting form.allowoutput=.f.

Chriss
 
As the output includes "LISTENER.VCX" I think it's save to assume you do use a listener of that vcx.
Well, fix the bug, update your VFP.

Chriss
 
Although not directly related to this problem, it's worth remembering that TALK is scoped to the current data session. If you have forms or classes with their own data sessions, you would need to SET TALK OFF in all of them (along with several other SET commands that are scoped to data sessions).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Dear mJindrova

Thank you. I went through it and downloaded the updated files.

Dear Chriss

AllowOutput=.f. did the trick it seems! But, when my form became clean, I saw that the same output was there on my main Vfp screen. Then I added Console Off in my startup and now it appears to be good.

Chriss said:
As the output includes "LISTENER.VCX" I think it's save to assume you do use a listener of that vcx
I do not know from where that 'LISTENER.VCX' was coming up. To use the new report output, I just issued SET REPORTBEHAVIOR 90 just before report preview and I am resetting it when the preview is exit.

Chriss said:
Well, fix the bug, update your VFP
I could not undestand! which bug?

Dear Mike,
If I set the TALK OFF globally, ie, through Config.fpw file, then it will be OFF everywhere by default, isn't it?

Thank you all,
Rajesh
 
What is your REPORT FORM command? If you use the OBjECT clause indirectly use a reportlistener from listener.vcx. There must be a reason this come up.
And this exact library has a bug or bugs, that are fixed with service packs. You seem to not use the latest VFP.



Chriss
 
Chriss,

My Report Form command is
Code:
REPORT FORM (pReportFile) PREVIEW NOCONSOLE

Chriss said:
You seem to not use the latest VFP
I have SP2 and Hotfixes done (those came up long back).
Do you have a link/source where I can download new patches (in case there is something additional) ?

I have downloaded the .APP files from Doug Hennig blog (in mJindrova's post above) and updated my files.

Rajesh
 
I don't know, then perhaps the app files from Doug have the problem in them.

For Foxypreviewer see its own download page: Even if you only aim for the latest report apps of native VFP, the foxypreviewer download page offers the last hotfix for version 9.0.0.7423 - see "other available downloads".
Besides sing foxypreviewer even with reports that don't use any of the features it adds to VFP will make reporting a better experience overall.

Chriss
 
If I set the TALK OFF globally, ie, through Config.fpw file, then it will be OFF everywhere by default, isn't it?

I don't think so. It will be OFF in the default data session, but if a form creates a private data session, then the setting will revert to its default, which is ON. At least, that's my understanding.

In the Load event of my base form class, I repeat all the SET commands that are scoped to the data session, as follows:

Code:
SET DATE BRITISH 
SET EXACT ON
SET SAFETY OFF
SET DELETED ON
SET TALK OFF 
SET NOTIFY OFF
SET CONFIRM ON
SET BELL OFF
SET SCOREBOARD OFF
SET STATUS BAR OFF
SET CENTURY OFF
SET EXCLUSIVE OFF
SET SECONDS OFF
SET REPROCESS TO 5
SET MULTILOCKS ON
SET TABLEPROMPT OFF
SET CURRENCY TO "£"
SET HOURS TO 24

I'm not sure if all of these are strictly necessary, but it costs nothing to do them.

By the way, toolbars are a bit of a problem in this scenario. The toolbar class doesn't have a Load, and by the time its Init has been executed, its too late to make these settings for any controls that need them. I have a toolbar class that mimics a ribbon-style menu, and I need to SET TALK OFF in the base class of the individual buttons.

I also notice that XFRX sets TALK ON in several places, which might confirm what others have said about report listeners.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike Lewis,

you're right and in regard to toolbars that's a problem. I know very well that the reportlilstener bug in the FFC classes causes the behavior we see. As far as I remember the bugfix is fixing more than just setting off talk. Even if talk is ON you only get such output, if you do something that outputs to the active form or to console and that is the bug of the listnerin listener.vcx

And by what I found here that's not a listener of the ffc reportlistener.vcx but of liistener.vcx of the project that builds the reportoutput.app, the original one from VFP9. thread184-1640637
So the output of LISTENER.VCX is somehow related to the reportoutput.app of VFP and you better use the one from the hotfix MSKB 968409 - Latest Hotfix for VFP9 SP2 - Updates VFP to v9.0.0.7423

SET TALK OFF - also in each load or init - only fixes the symptom, not the bug itself.
PS: I'm aware the tek-tips thread is about using the HTML listener, but the bug described was topic in reporting anything. It's just a VFFP bug that SPs already fixed.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top