I was having a problem with running my deployed app which seems to be
caused by displaying a MessageBox before the main app shell is opened. It can be replicated with other deployed apps. For example, when I deploy and run the Video Library sample application, it runs fine. However, if I add a MessageBox before 'VideoLibraryShell show' as shown below, the deployed app terminates after displaying the MessageBox for a split second. It doesn't wait for any user input. VideoLibrarySessionManager>>main "Start up the Dolphin Video Library sample application" MessageBox notify: 'Here goes nothing!'. VideoLibraryShell show The same thing happens if I place the MessageBox line in ... VideoLibraryShell>>onViewOpened super onViewOpened. self onTapeSelected. MessageBox notify: 'Here goes nothing!!!' In a Development image, it executes as per the code. But as a deployed EXE, I first see the Dolphin Evaluation warning messagebox (as I'm using Dolphin 4 Pro Evaluation), and then it terminates. All I saw was the MessageBox (MessageBox notify: 'Here goes nothing!!!') appearing and disappearing quickly just before it quit. Thanks and Best Regards, Ravi |
Ravi
You wrote in message news:[hidden email]... > I was having a problem with running my deployed app which seems to be > caused by displaying a MessageBox before the main app shell is opened. > It can be replicated with other deployed apps. > ... This is a known issue: If you are going to open a message box before any other windows during Dolphin's startup processing, then you must make it #taskModal. If you don't then the "startup" process is suspended when the message box is opened. This will allow the background idle loop to notice that there are no windows open (the MessageBox is not considered to be a Dolphin window). What happens next is the responsibility of the installed SessionManager (more precisely its #keepAlive method), but the default behaviour is to initiate system shutdown because there are no windows open. To avoid this happenning, either: a) Use a task modal MessageBox (e.g. MessageBox new taskModal; notify: 'Hello'); or b) ensure that your MessageBox is opened after the shell window; or c) override #keepAlive. If you override #keepAlive to do nothing (for example), then you will need to explicitly initiate system shutdown, for example when your main shell window is closed. Obviously the easiest thing to do is to use a task modal message box. You should also avoid using a message box which is not task modal on system shutdown (e.g. to prompt the user as to whether they really want to shut down), as this may also cause problems. Regards Blair |
Blair,
"Blair McGlashan" <[hidden email]> wrote in message news:<a1n4au$rqmcm$[hidden email]>... > Ravi > > You wrote in message news:[hidden email]... > > I was having a problem with running my deployed app which seems to be > > caused by displaying a MessageBox before the main app shell is opened. > > It can be replicated with other deployed apps. > > ... > > This is a known issue: If you are going to open a message box before any > other windows during Dolphin's startup processing, then you must make it > #taskModal. If you don't then the "startup" process is suspended when the > message box is opened. This will allow the background idle loop to notice > that there are no windows open (the MessageBox is not considered to be a > Dolphin window). What happens next is the responsibility of the installed > SessionManager (more precisely its #keepAlive method), but the default > behaviour is to initiate system shutdown because there are no windows open. > > To avoid this happenning, either: > a) Use a task modal MessageBox (e.g. MessageBox new taskModal; notify: > 'Hello'); or > b) ensure that your MessageBox is opened after the shell window; or > c) override #keepAlive. > > If you override #keepAlive to do nothing (for example), then you will need > to explicitly initiate system shutdown, for example when your main shell > window is closed. Obviously the easiest thing to do is to use a task modal > message box. > > You should also avoid using a message box which is not task modal on system > shutdown (e.g. to prompt the user as to whether they really want to shut > down), as this may also cause problems. > > Regards > > Blair Thanks for the explanation! But I wonder if this issue has been documented somewhere, like a 'known issues' webpage, that I didn't know about. Best Regards, Ravi |
Free forum by Nabble | Edit this page |