New topic: App's "UnhandledException" event fails in modal window
<http://forums.realsoftware.com/viewtopic.php?t=37359> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message basil.bourque Post subject: App's "UnhandledException" event fails in modal windowPosted: Tue Feb 01, 2011 1:08 am Joined: Thu Apr 15, 2010 10:41 pm Posts: 158 Location: Seattle Why does the app's "UnhandledException" event fail to fire when the app opens a window programmatically with App property Appearance > DefaultWindow set to "None"? I filed this Feedback case: <feedback://showreport?report_id=15707> 1) Create a new Desktop app. 2) Add a button with this "Action" event handler: --- dim x() as String x.Append "un" x.Append "deux" dim y as String = x(5) // Generates an "OutOfBoundsException" exception. --- 3) Add this code to the App's "UnhandledException" event handler. --- beep MsgBox "Basil says: Unhandled exception occurred. Sorry, Charlie." Return False // False = Allow REAL Studio's default unhandled exception error processing to occur. --- 4) Run the app. When debugger breaks, click Resume to continue. Notice that you get a beep and MsgBox. 5) Modify app: 5a) Set App property Appearance > DefaultWindow set to "None". 5b) Add this code to the App's Open event handler. --- dim loginWin as Window1 = new Window1 loginWin.ShowModal // Blocks until user completes it. --- 6) Run the app. Notice that you do NOT get a beep and MsgBox. You don't even get the built-in dialog box about an unhandled exception. Is that a bug, where the UnhandledException fails to run? Why is the exception being swallowed/ignored/not-being-raised? --Basil _________________ --Basil Bourque Using REAL Studio 2010 r5 with Postgres 9 on Mac OS X 10.6.4 http://crafted-software.blogspot.com/ Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
