Not really a bug, but...

Steven Swerling sswerling at yahoo.com
Fri Mar 4 18:51:45 UTC 2005


Hi Rob,

I've been plodding along w/WxMorphicPanel, things seem to be going well, 
knock on wood.

I did get some crashes during image save since my subclass of 
TopLevelPresenter does not yet know how to "saveView" or "restoreView".

Somehow, one of my test windows was in AllTopLevelPresenters even though 
it was no longer alive. I managed to get quite a few crashes during the 
early stages of my work w/ WxMorphicPanel. Somehow during this phase I 
must have got a bug that didn't crash the image but managed to mangle 
the 'deleteObject' machinery.

Anyway, the little snippet below fixed the problem. Just does a #isValid 
check on the view's handle before calling storeView.

!TopLevelPresenter class methodsFor: 'as yet unclassified' stamp: 'sps 
3/4/2005 13:22'!
shuttingDown: quitting

	WxBase removeDeletedObjects.
	
	self allTopLevelPresenters copy do: [:presenter |
		presenter view handle isValid
			ifTrue:[	presenter storeView ]
			ifFalse: [self allTopLevelPresenters remove: presenter]
	].
! !



More information about the Wxsqueak mailing list