The close of a Splash is forcing the close of a dialog
- From: "Sebastián" <ssastre@xxxxxxxxxxxxxxx>
- Date: 15 Sep 2006 10:16:10 -0700
Hi there,
anybody knows how to avoid a situation in wich the close of a Splash
is forcing the close of a dialog?
I have a code like this:
XXXApplicationShell>>initializeUser
| dialog |
login := self applicationLoaderSupport createOn: self newUser.
login
userSession: userSession ;
validationBlock:[:candidate| blah blah... true or false];
userGetterBlock: [:candidate| the fresh user object from repository];
loginAllowedBlock: [:user|];
loginNotAllowedBlock: [:candidate|blah blah... you cannot login];
yourself.
self trigger: #aboutToLogin.
^ login showModalTo: self view
1. The triggered #aboutToLogin is cached by the splash and it uses it
to close itself (#forceClose).
2. The #showModalTo: is to ensure that the dialog is related to the
application shell (and not the splash).
3. In that point, the application shell is instantiated but not visible
yet.
I've put a halt on the close of the dialog and saw that the #close
message cames from a windows message (event) and I don't know how to
prevent it. Going back in that stack shows that the close of the Splash
implies somehow the sending of that windows event. I've also check that
the #basicDestroy where the handle of the Splash and not other and, as
expected, it was.
I can't say what is happening in ProcessorScheduler>>callback:evaluate:
but debugger reveals that it enters to execute the ifCurtailed: block
wich derivates in the dispatching of the window event that sends
#onDestroyed to the poor dialog.
It is curious that in
XXXApplicationShell(ApplicationShell)>>initializeUser, one line after
the #trigger: #aboutToLogin, the #showModalTo: is called but it is not
seen in the process. Its behavior is like it is closing a window (the
dialog) that nobody has opened (yet).
The semaphore that the splash uses can being noisely interfering
here?
I'll appreciate any help, thanks,
Sebastian
PD: I'll put a trace of that debugging situation below this line:
____________________________________________________________
XXXApplicationLoaderDialog(SystemLoaderDialog)>>onViewClosed
DialogView(View)>>onDestroyed
DialogView(View)>>wmDestroy:wParam:lParam:
DialogView(View)>>dispatchMessage:wParam:lParam:
[] in InputState>>wndProc:message:wParam:lParam:cookie:
BlockClosure>>ifCurtailed:
ProcessorScheduler>>callback:evaluate:
InputState>>wndProc:message:wParam:lParam:cookie:
Splash(View)>>basicDestroy
Splash(View)>>destroy
Splash(Splash)>>forceClose
EventMessageSend>>forwardTo:withArguments:
EventMessageSend>>value
[] in MessageSequenceAbstract>>value
EventMessageSequence>>messagesDo:
EventMessageSequence(MessageSequenceAbstract)>>value
EventsCollection>>triggerEvent:
XXXApplicationShell(Object)>>trigger:
XXXApplicationShell(ApplicationShell)>>initializeUser
XXXApplicationShell(ApplicationShell)>>initializeUserSession
XXXApplicationShell(ApplicationShell)>>onViewOpened
XXXApplicationShell(Shell)>>view:
XXXApplicationShell(Shell)>>createView:
XXXApplicationShell class(ApplicationShell class)>>create:on:for:
XXXApplicationShell class(ApplicationShell class)>>showFor:
[] in TrayApplicationLoaderShell>>onViewOpened
ExceptionHandler(ExceptionHandlerAbstract)>>markAndTry
[] in ExceptionHandler(ExceptionHandlerAbstract)>>try:
BlockClosure>>ifCurtailed:
BlockClosure>>ensure:
ExceptionHandler(ExceptionHandlerAbstract)>>try:
BlockClosure>>on:do:
[] in BlockClosure>>newProcess
.
- Prev by Date: System Tray Icon - anyone got the latest app?
- Next by Date: Re: System Tray Icon - anyone got the latest app?
- Previous by thread: System Tray Icon - anyone got the latest app?
- Index(es):