VIP - Function Rename
Posted 17 October 2007 - 02:20 PM
Simple screen to allow display, addition and removal of data from a file. The file data is shown using a ListBox. Two fields allow input of the key and a description (reference data). A button allows Add and another removes. In either case the ListBox is refreshed to show the changes.
Renamed it in VIP with a re-gen of both the function and the selection global (renamed the ListBox too). Re-gen for the name change for the global call for the ListBox - the ONLY code change. Now when the list box is used to select a record for removal, on entry to the ListBox the LAST record is highlighted (and it's below the screen size). Before it was renamed, the first record was highlighted - as you would expect.
Anyone seen this before and know what needs re-set/deleted/removed?
Posted 17 October 2007 - 04:47 PM
It's been a while since using VIP, as my current position forced me to regress to something else, but if I recall I had a similar experience once where the field name was that of a variable that had already been set. As such, when I windowed on the LB (or maybe it was a CB...to many years ago ), the LB was set to the preset value and the value highlighted...ie. Not the first record, as I expected.
I believe the problem was a combination of @SPSEQ not being correct and/or MAXPAGE not being reset after a change in the file structure so that it was highlighting a whitespace PSEQ record.
I just threw this out as your LB is not selecting the first value upon entry, it sounds like your system thinks that this is not a first time entry but a revisit and is displaying what it thinks you've already selected. Find out why the system thinks that the value it's highlighting is the correct one, and you'll find the reason behind the initial selection problem at least.
HTH -o- GL,
Posted 17 October 2007 - 10:19 PM
Already did a re-gen after the rename of the function (and the global it calls for the ListBox).
Thanks for the pointers. I'm not using @SPSEQ or MAXPAGE or @PSEQ. It's a flat file displayed in a list without using a sequence number. Like I said - it couldn't really be simpler.
It's like it's displaying the list correctly but getting "stuck" on the last record and not going back to the top to highlight the first record.
Pro IV may of course be internally using the positioning variables but that still doesn't make me appreciate how it worked before it was renamed.
It's not that important - since it will be used on system set up and rarely thereafter but it's annoying because there's no apparent reason for it - just wondered if anyone else using VIP had seen the same problem and knew of the solution.
If anyone knows - telling me might stop me pulling out what little is left of my hair.
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users