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
Pulling the focus ensures the scroll change script is executed to save the current line. But the should the focus back to the scrolling window then issue the command to move.
If they are updating the contents of the scrolling window, they should use fill window with the from current and/or refresh keywords.
Regards
David
Hi David,
I thought it was odd they were pulling focus away from the scrolling window. I will make the changes you suggested and test it again.
Sorry Almas, that is not possible.
Hi Mark
The Window_ScrollScrollingWindow() function needs you to current be focused on the previous line.
You might need to use fill window from current and a focus statement or Window_SetFocus() beforehand to ensure you are in the correct position first.
David
Hi Mark,
I have worked on many scrolling windows and can help you. If you wish you can provide me your development dictionary so I can review your code.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156