Window Structure - Multi-page definitions (AREV Specific)
At 01 AUG 2005 03:08:58PM Matt Sorrell wrote:
I have a WINDOWS template (ARev 3.02) that is set up as a multi-page window. The page definitions are slightly out of whack because previous developers (myself included) were not very good about re-updating page definitions and prompt order.
I am trying to clean up the window and I think I have made the problem even worse.
My question is: where in the window structure definition does the system store prompt-associations for the page definitions? I want to clean them out manually and start all over with defining the pages.
Thanks!!
At 01 AUG 2005 04:07PM Matt Sorrell wrote:
Well, after digging around some more both here and in the RevMedia, I was able to figure out that I was looking for the HOMEXY attribute as defined in LCPOSITIONS.
I was able to hack together a small program that accomplishes this task nicely. I present the code here in case it will help someone else out of a jam. It is rather crude and a lot of stuff is hardcoded, but should be pretty easy to extend.
As always, no warranties or guarantee of merchantability, use at your own risk, make sure you perform backups and get all of your vaccinations first, and all of the usual disclaimers apply.
/* ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± Author: Matt Sorrell Date: 08/01/2005 Purpose: Reset virtual page marks defined in a window Theory of Operation: Page marks are stored in position 52 for prompt data. The format appears to be 0:@SVM:nn, where nn is the starting line depth of the page. All prompts on the same logical page will have the same value in position 52 (HOMEXY in LCPOSITIONS). The program prompts for a WINDOWS template name and then iterates through all of the prompts removing the logical page marker (setting it to ''). ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± */ * Inserts & Equates $INSERT SYSINCLUDE,LCPOSITIONS EQU ProgramName$ TO 'Reset_Window_Page_Marks' * Declares Declare Subroutine Msg, FSMsg, Catalyst *--------------------]] P r o g r a m T o p For Cntr=2 to (NumPrompts + 1) ThisPrompt=WindowsRec ThisPrompt=Null$ WindowsRec=ThisPrompt Next Cntr Write WindowsRec on WindowsTable, WindowsID Else Msg('Could not write the udpated window!%B%') End End Else Msg('Could not read template %1% from WINDOWS!%B%', '', '', WindowsID) End Stop
At 01 AUG 2005 04:10PM Matt Sorrell wrote:
Sorry, a slight error introduced itself into the code.
The following three lines:
ThisPrompt=WindowsRec
ThisPrompt=Null$
WindowsRec=ThisPrompt
should read instead:
ThisPrompt=WindowsRec
ThisPrompt=Null$
WindowsRec=ThisPrompt
I apologize for the confuse on that.
At 01 AUG 2005 05:00PM Victor Engel wrote:
"a slight error introduced itself into the code."
Passing the buck, eh?
At 01 AUG 2005 05:15PM Matt Sorrell wrote:
When I exported the program to a text file, the portion was there. I looked back at the file to make sure. Besides, I had already run the program against the template and it worked like a champ.
For some reason the discussion board decided it was hungry or something.
No, really!!
*grin*