Problem with Change function on PagedWindow
jarvisteach opened this issue · comments
The docs on paged window change function aren't clear
Setting a change function on the paged window doesn't work as expected.
Currently, the change function is being used to determine if pages can be changed.
But it's also used when building the window, to go back to the relevant page.
There should be two options:
- A standard change function - called as notification when page changes
- A 'let change' function - to determine if the page can be changed
The docs then need updating.
At the end of adding multiple pages to the PagedWindow, it was calling showPage(1)
. This has been updated to set callFunction
to False, so that the change function isn't called when the page 'changes'
Now the current function supports both use cases. Unless it specifically returns False
, it just acts as a notification function, but if it returns False, the page won't change.