Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 08 SEP 2003 12:27:55PM Michael Slack wrote:

I'm working in AREV 3.12. I'm working on a simple report that the user can choose to send to the screen, the printer or a file. The actual report output itself is working correctly. My problem is after it gets done printing to the screen and returning back to the menu it was called from. The colors start to change and the text within a message box and the message box boarder are off set so the text spills out of the boarders. The same text/boarder offset is happening with the menus. Everything still works, it just doesn't look right. I've been trying to fix this problem (what should be a minor fix) but I can't seem to find the right combination. I've looked high and low for an answer but with no luck.

I've copied the program I'm working with to a new program and cut it down severly to just the key points to try different solutions. I'm including my cut down program, in case someone can see my mistake. Or if someone can point me in the right direction to some documentation. I've already seached the knowledge base, this on-line discussion area, my manuals and our other programs that use VIDEO.RW and the like. And there is still no joy in mudville.

Thank you for your time,

Michael Slack

* VIDEO_RW_TEST

*

Declare Subroutine Msg

DECLARE SUBROUTINE INIT.VIEW

DECLARE FUNCTION VIDEO.RW

*

* DYNAMIC ARRAY USED TO HOLD VIDEO.RW ERRORS

VERRORS ='

VERRORS =OUT OF MEMORY DURING READ ATTEMPT."

VERRORS =DISPLAY IS NOT MEMORY-MAPPED."

VERRORS =COL OR ROW IS OUT OF RANGE."

VERRORS=LEFT COL IS GREATER THAN RIGHT COL, OR"

VERRORS=TOP ROW IS GREATER THAN BOTTOM ROW."

VERRORS =ARGUMENT FOR MODE WAS NOT 'C', 'R' OR 'W'."

VERRORS =SIZE OF SAVED IMAGE IS LESS THAN AREA TO BE RESTORED."

LEFT =0 ;* LOCATES LEFT MAGRIN OF REPORTS WINDOW.

TOP =0 ;* LOCATES TOP ROW.

RIGHT =(@CRTWIDE - 1) ;* LOCATES RIGHT MARGIN OF REPORTS WINDOW.

BOTTOM =(@CRTHIGH - 1) ;* LOCATES BOTTOM ROW OF REPORTS WINDOW.

IMAGE =' ;* AREA WHERE DISPLAY IS WRITTEN AND RESTORED.

* INITIAL CLEANUP.

CLEARSELECT

PRINTER OFF

PERFORM 'PDISK PRN'

GOSUB READ_AND_SAVE_VIDEO_IMAGE

GOSUB CLEAR_VIDEO_IMAGE

OUTPUT=T' ;* OUTPUT TO THE TERMINAL

If Output=T" Then

 INIT.VIEW(132)
 @VIEW.MODE=1

End Else

 Printer On

End

HEADING "HEADING TO PROGRAM VIDEO_RW_TEST PAGE: 'PLL'"

FOOTING ""

FOR I=1 TO 55

PRINT I

NEXT I

PRINT

PRINT '* END OF REPORT *'

PRINT

PAGE

@VIEW.MODE=0

PRINTER OFF

PERFORM 'PDISK PRN'

GOSUB WRITE_BACK_SAVED_VIDEO_IMAGE

STOP

READ_AND_SAVE_VIDEO_IMAGE:

*

OPERATOR=R" ;* READ AND SAVE THE SPECIFIED AREA OF DISPLAY.

VIDEO_ERROR=VIDEO.RW(LEFT,TOP,RIGHT,BOTTOM,OPERATOR,IMAGE)

IF VIDEO_ERROR THEN

MSG(VERRORS,'A','','')

END

RETURN

CLEAR_VIDEO_IMAGE:

*

OPERATOR=C"

VIDEO_ERROR=VIDEO.RW(LEFT,TOP,RIGHT,BOTTOM,OPERATOR,) IF VIDEO_ERROR THEN MSG(VERRORS,'A',,) END RETURN WRITE_BACK_SAVED_VIDEO_IMAGE: * OPERATOR=W' ;* WRITE THE STORED IMAGE BACK TO THE SPECIFIED AREA. VIDEO_ERROR=VIDEO.RW(LEFT,TOP,RIGHT,BOTTOM,OPERATOR,IMAGE) IF VIDEO_ERROR THEN MSG(VERRORS,'A',,'')

END

RETURN


At 08 SEP 2003 03:52PM Victor Engel wrote:

@VIEW.MODE=1 should go before, not after INIT.VIEW.


At 08 SEP 2003 03:59PM Victor Engel wrote:

OK. I've changed my mind. I would take out the @VIEW.MODE=0 (but I still prefer setting it to 1 before INIT.VIEW calls). That way, in order to get out of the report, the user would have to escape from the view. With that code in there, printing can continue, but uncontrolled by the view manager.


At 09 SEP 2003 10:18AM Michael Slack wrote:

Hello Victor:

Thanks for the information.  My initial testing shows that I'm not getting the funky colors any more but I still having a problem with text and the boarder for a popup and the TCL line not lining up when they are displayed after coming out of the print to the screen report.  They still work correctly, they just don't look like they are supposed to.
After I had successful results with my test program, I modified my real program.  That is where the things like the popup and TCL came in.
I'm going to continue to play with my programs to see if I can correct these last little annoyances.

Thanks,

Michael Slack


At 09 SEP 2003 10:23AM The Sprezzatura Group wrote:

You're not calling this as a subroutine from the menu are you?

The Sprezzatura Group

World Leaders in all things RevSoft


At 09 SEP 2003 10:51AM Victor Engel wrote:

When resetting @VIEW.MODE, set it to null, not 0. I don't think this is your problem, but if you use this variable and toggle it, you can run into problems if you use 0 instead of null.


At 09 SEP 2003 11:15AM Michael Slack wrote:

Hello Voctor:

Setting @view.mode to null instead of zero helped out a great deal.  I still have some minor problems but nothing as glaring as before.  Thank you for your help.

Michael Slack


At 09 SEP 2003 11:20AM Michael Slack wrote:

Hello:

Yes, I'm calling the process from a menu as a subroutine.  The reason being is that there is one parameter that is being passed into the subroutine.
Actually, the full blown process I'm dealing with is two subroutines.  The first is called from a menu.  This one gets from the user what to print and where to print it.  Then it calls the subroutine and passes it parameters to do the actual report generation.
There isn't anything special about any of the parameters that are being passed.

Thanks,

Michael Slack


At 09 SEP 2003 11:36AM The Sprezzatura Group wrote:

It's just that Exiting a Subroutine forces the clear up. Can you Execute the main program that calls the sub?

The Sprezzatura Group

World Leaders in all things RevSoft


At 09 SEP 2003 12:00PM Don Miller - C3 Inc. wrote:

Executing a Main program which calls a subroutine that does the VIDEO.RW work is what I've always done too. Had problems calling a Subroutine that used VIDEO.RW from a menu as early as AREV 2.1x, too.

Don M.


At 10 SEP 2003 09:34AM Michael Slack wrote:

Hello:

Yes, I'm fairly sure that I can execute the subroutine that I'm working with and deal with the parameter that is being passed in the @Sentence but I'm going to have to leave that for another day.  Unfortunately, I've spend more time on this problem then I had orginally intended.  Someone recommended that I set the @VIEW.MODE to null instead of 0, after I did that most (not all) of my problems cleared up.  With a bit more work with the code, I was able to clear up a few other litte annoyances dealing with how things displayed.  I haven't gotten rid of them all but I think we can live with the left over minor ones for now.  I'll definitly keep in mind the use of the EXECUTE of a subroutine that uses VIDEO.RW.  I hope in the very near future, I'll be able to get back to this set of programs and finish them off right.

Thanks for your help.

Michael Slack


At 10 SEP 2003 09:41AM Michael Slack wrote:

Hello Don:

I'll keep the use of the Execute in mind whenever I use the VIDEO.RW in a subroutine.  With the help I've gotten from everyone and a good bit of tweaking of the code until it worked right, the process almost works flawlessly.  There are one or two minor annoyances but we can live with them for now.
I would like to thank you and everyone else that helped.  I wouldn't have been able to fix my problem otherwise.

Thanks,

Michael Slack

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/7a27a88ea741999885256d9b005a7298.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1