AbtPortableNotebookPageView inconsistent behavior
In VisualAge Smalltalk V6.0.3, code was changed in AbtPortableNotebookPageView so that invoking the aboutToBeSwitchedTo event was not deferred. This aligned its implementation with aboutToBeSwitchedFrom which also is not deferred. Before this change was made, if a user quickly clicked on more than one notebook tabs which had associated events, the events could be run out of order. For example, if Page2 has the aboutToBeSwitchedTo and aboutToBeSwitchedFrom events connected, and if a user is on Page1 and rapidly clicks first on the tab for Page2 and then on the tab for Page3, the events could be run in the order switchFromPage2 followed by switchToPage2. This is obviously incorrect behavior.
Unfortunately, some user applications depended on the deferral of execution of the aboutToBeSwitchedTo event. For example, it could be used to set focus to a particular subpart of the notebook page when the tab for the page was selected. These application were broken by the change.
Since it is not possible to automatically satisfy the needs of both sets of applications -- those that depend on execution deferral and those that depend on no execution deferral -- another solution is needed.
One possible solution for these broken applications is to change their implementation so that the aboutToBeSwitchedTo handler does the deferral of execution itself if needed. So a method that needs this capability and that used to look like this:
aboutToBeSwitchedTo: aComp
aComp setFocus
could be rewritten as:
aboutToBeSwitchedTo: aComp
[aComp setFocus] abtDefer
Another solution is to return the system's implementation to the old (deferral of execution) behavior. This can be done by changing the the value of following line in the .INI file from false (VA Smalltalk default behavior) to true (VisualAge Smalltalk V6.0.2 and previous behavior):
[Version Compatibility]
deferPortableNotebookPageSwitchToCallback=false
Last modified date: 07/02/2019