This is one for the Dex developers.
I have a scrolling window where users can enter a product number, the warehouse and the price per unit before moving to the next line. Every product number is unique so no quantity is required. All very straight forward.
However, the user can also enter a special code into the product field that will then prompt for a product list number. This is a predefined list of products. Once they enter the list number, it will read the first product, display that in the scrolling window and then prompt the user for the warehouse and price.
Once these are entered, the user enters another special code to automatically add the remainder of the list to the scrolling window. The screen automatically loads each product, warehouse and price based on the first line entered.
After each line is added, it should scroll to the next line.
My issue is that sometimes it does scroll to the next line and sometimes it doesn't and all of the products overwrite line 2 on the scrolling window. The product lists are usually 100-200 lines in length.
What I cannot work out is why it isn't either consistently working or consistently failing. I have tried running this with debug turned on and still it sometimes works and sometimes doesn't and there are no errors or obvious issues I can find.
Has anyone tried doing this before? I know I can populate scrolling windows for display purposes easily but this needs to be interactive (it is an Adds Allowed window). This is the list of commands we are using to force the window to move to the next line. This is done after it loads the next product number onto the screen.
Window_PullFocus(window NewAssetEntryScroll);
fill window NewAssetEntryScroll;
force changes window NewAssetEntryScroll;
Window_ScrollScrollingWindow(window NewAssetEntryScroll, SCROLLTYPE_NEXT);
Has anyone tried something similar to this before?
I have a feeling I may have to rewrite the entire process to use a different method. I have tried playing around with the script and generally it makes it worse.
Any ideas would be appreciated.
Mark