VA 7.0 - Non-database issues

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

VA 7.0 - Non-database issues

Postby cknittel » Wed Dec 13, 2006 6:34 am

Hi,

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
cknittel
 
Posts: 27
Joined: Tue Nov 28, 2006 6:10 am
Location: Vienna - Austria

Postby solveig » Mon Dec 18, 2006 8:19 am

Christoph:

Thanks for the list. We'll certainly look at them, prioritize them and consider them for furture release.

As for the database fixes you posted, we may also need to ask you more questions :) .

Thanks again,
Solveig
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am

Postby solveig » Tue Dec 19, 2006 12:18 pm

Chrisoph:

1. VM blocked by open menus or file load/save dialogs
Although it works as it was designed, we will look into whether it is possible to change this behavior without breaking existing application behavior.
WRT your workaround using the coroutine, we can't use coroutineCall since it is much higher in the prereq chain, but it might be possible to use an async call.

2. AbtContainerDetailsView>>#selectColumn:
Yes, this is clearly broken. Do you by any chance have a test case which would trigger the error? If so, please send it to vast-support@instantiations.com.

3. SST: handler can be nil in #clearPendingRepliesWith:
Before changing the code, we would need to understand why the handler is nil. Do you have a test case? If so, sent it to vast-support@instantiations.com.

4. Operations that should be performed in the UI process
Checking into this; again, a test case would be useful.

5. Wish: Mouse Wheel support
Agreed. wheeled mice are quite common.

6. Wish: Support for Microsoft HTML help (.chm) files
Researching this.

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
Yes, I'll record both 7 and 8 as future enhancements.
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am

Postby cknittel » Fri Dec 22, 2006 1:35 am

Hi Solveig,

Thanks for your reply.

As I am on vacation until January 11, I am afraid I cannot give you any more details at the moment.

I will send you the requested information a soon as I am back in the office.

Thanks and best regards,
Christoph
cknittel
 
Posts: 27
Joined: Tue Nov 28, 2006 6:10 am
Location: Vienna - Austria

Postby cknittel » Mon Jan 15, 2007 6:52 am

Hi Solveig,

As for test cases:

2. AbtContainerDetailsView>>#selectColumn:

To reproduce, create a new visual part with a window containing a container details widget with one or two columns.

Implement #finalInitialize like this:

Code: Select all
finalInitialize
   " "

   | container |

   container := self subpartNamed: 'Container Details1'.

   container selectColumn: container columns first.


Test the visual part, a walkback occurs.

3. SST: handler can be nil in #clearPendingRepliesWith:

I am afraid I do not have a test case for this. :-( The problem occurred intermittently in a production environment.

4. Operations that should be performed in the UI process

Just add assertions that check for "Processor runningInUI" to the following methods:

Code: Select all
OSHwnd>>#closeWindow
OSHwnd>>#destroyWindow
OSHwnd>>#drawMenuBar
OSHwnd>>#screenToClient:
OSHwnd>>#setFocus
OSHwnd>>#setMenu:
OSHwnd>>#showWindow:
OSHwnd>>#showWindowAsync:
OSHwnd>>#updateWindow


and go through the different functions of the development environment to check for UI-related calls originating from non-UI processes.

Best regards,
Christoph
cknittel
 
Posts: 27
Joined: Tue Nov 28, 2006 6:10 am
Location: Vienna - Austria

Postby solveig » Thu Jan 18, 2007 9:35 pm

Christoph:

Thanks for your reply.

2. AbtContainerDetailsView>>#selectColumn:
With your description I was able to create a test case, generater the error and fix it. Thank you very much. I will enter it into the fixes for VAS 7.5.1.

4. Operations that should be performed in the UI process
Thanks for the additional information. We'll look into this as well.

Regards,
Solveig
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am

Postby solveig » Tue Apr 03, 2007 10:21 am

Christoph:

Here are the items which will be in 7.5.1:

case 24659 #2. AbtContainerDetailsView>>#selectColumn:
case 24661 #7. Wish: Getters/setters for an attribute should be generated in a default category
case 24662 #8. Wish: Interface declarations (_PRAGMA_IS, ...) should be generated in a default category

Solveig
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am

Postby solveig » Tue Apr 10, 2007 8:36 am

Christoph:

Cases have been opened for these istems:
1. VM blocked by open menus or file load/save dialogs Case 19796
4. Operations that should be performed in the UI process Case 28367
5. Mouse Wheel support Case 24660
6. Wish: Support for Microsoft HTML help (.chm) files Case 28368

Regards,
Solveig
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest