Here is the promised list of non-database issues with the VA 6.x/7.0 frameworks.
1. VM blocked by open menus or file load/save dialogs
2. AbtContainerDetailsView>>#selectColumn:
3. SST: handler can be nil in #clearPendingRepliesWith:
4. Operations that should be performed in the UI process
5. Wish: Mouse Wheel support
6. Wish: Support for Microsoft HTML help (.chm) files
7. Wish: Getters/setters for an attribute should be generated in a default category
8. Wish: Interface declarations (_PRAGMA_IS, ...) should be generated in a default category
Let's start with the most severe one.
1. VM blocked by open menus or file load/save dialogs
On Windows, pull down menus that are left open block all processing in the Smalltalk VM. That's right, all processing, not just the GUI process, but also all background processes.
Not all Windows application suffer from this problem, so the blocking must somehow be related to VA's implementation of Windows event handling.
I have brought this issue up earlier in emails to IBM and Instantiations support, so far without any result.
The same problem exists with file selection prompters that are left open.
However, for the file selection prompters, I was able to fix the problem by using #coroutineCallWith: instead of #callWith: in
OSOpenfilename>>#getOpenFileName and
OSOpenfilename>>#getSaveFileName
This change might have side effects, but I am currently not aware of any.
2. AbtContainerDetailsView>>#selectColumn:
The implementation
- Code: Select all
selectColumn: aColumn
widget == nil
ifTrue: [(self columns includes: aColumn)
ifTrue: [(self selectedColumns includes: aColumn)
ifFalse: [self selectedColumns: (self selectedColumns add: aColumn)]]]
ifFalse: [widget selectColumn: aColumn tableColumn].
is incorrect, because #add: returns the added element.
Instead, it should be
- Code: Select all
selectColumn: aColumn
widget == nil
ifTrue: [(self columns includes: aColumn)
ifTrue: [(self selectedColumns includes: aColumn)
ifFalse: [self selectedColumns: (self selectedColumns add: aColumn; yourself)]]]
ifFalse: [widget selectColumn: aColumn tableColumn].
3. SST: handler can be nil in SstRemoteInvocationHandler>>#clearPendingRepliesWith:
SstRemoteInvocationHandler>>#clearPendingRepliesWith: is implemented like this:
- Code: Select all
clearPendingRepliesWith: marker
^self handler clearPendingRepliesFrom: (Array with: self endpoint) with: marker
It can occur that "self handler" becomes nil. I cannot exactly say under what conditions, but the error message I get looks like this:
- Code: Select all
(08.07.2005 14:38:53) Exception in SST invocation server (Process:Worker 16521
{running,3}): Signal on Exception: (ExError) An error has occurred. with:
('UndefinedObject does not understand clearPendingRepliesFrom:with:')
Therefore, a check for nil should be added to #clearPendingRepliesWith:.
4. Operations that should be performed in the UI process
As a tool for diagnosing issues with GUI operations being performed in non-UI processes, I have added assertions in the underlying "primitives" in OSHwnd, e.g. #updateWindow, #screenToClient:, ...
This was a great debugging help for my own code, but I also found that there is some VA code that performs UI operations outside of the UI process. (However, so far I am not aware of any negative effect for those cases.)
Unfortunately, I do not have a complete list, but here are two examples:
The call
- Code: Select all
self currentPointerLocation
in AbtEwHoverHelpManager>>#backgroundProcess should be wrapped in a syncExecInUI: call, and EsWindowSystemStartUp>>#cleanUpBeforeWalkback should be changed as follows:
- Code: Select all
cleanUpBeforeWalkback
"Perform any cleanup required before a walkback occurs."
self emergencyInitialize.
CwAppContext default syncExecInUI: [
CommonWidgets cleanUpBeforeWalkback.
CommonGraphics cleanUpBeforeWalkback.
System resetBusyCursor.
].
5. Wish: Mouse wheel support
Mouse wheel support is currently available as an unsupported goodie.
It would be great if that could be integrated into the 7.5 release.
6. Wish: Support for Microsoft HTML help (.chm) files
The help system currently does not support Windows HTML help (.chm) files.
I have an ugly hack that makes them work, but I would prefer not to publish it here.
7. Wish: Getters/setters for an attribute should be generated in a default category
When defining an attribute and generating getters/setters from it, a default category (e.g. "Accessors") should be set.
In
- AbtAttributeSpec>>#generateGetSelector:featureBuilder:named:forClass:
- AbtAttributeSpec>>#generateSetSelector:featureBuilder:named:forClass:
change
- Code: Select all
context
currentSelector: aSelector;
compileAndAddPublicMethod: methodText contents.
to
- Code: Select all
context
currentSelector: aSelector;
categories: #('Accessors');
compileAndAddPublicMethod: methodText contents.
8. Wish: Interface declarations (_PRAGMA_IS, ...) should be generated in a default category
The private methods _PRAGMA_IS_, abtPrimFlushInterfaceSpecCache, abtUntranslatedConstants etc. that are generated by AbtAppBldrPartBuilder>>#generateRuntimeCodeFor:in:codeGenerationParameters: should be assigned to a default category.
This can be done by changing
- Code: Select all
...
aContext
currentSelector: #abtBuildInternals;
compileAndAddPrivateInstanceMethod: aStream contents.
...
to
- Code: Select all
aContext
currentSelector: #abtBuildInternals;
categories: #('IS_generated');
compileAndAddPrivateInstanceMethod: aStream contents.
(if using "IS_generated" as the category name).
Thanks and best regards,
Christoph