hello expert Xojo,
I am getting a “Event loop” under the stack after closing a child window, after the child updates a listbox on the parent window.
similar to this post https://forum.xojo.com/31255-event-loop/0#p255683
but i am using a mac App.
Then when i hit the > continue button i get “An Exception of class NilObjectException was not handled. The app must shut down”
in the Open event of the Child Window i am only setting text area values, and i am not handling a close event for the child window.
It seems that if i hit a [save] button i created on the parent window. the exception does not take place. but if i don’t hit the [save] button.
and try to close the child window, clicking the red dot. i get this Exception. I have repeated this many many times with the same results. there is a NilObject some where but i have no idea where
I am baffled to say the least.
Just like in that thread there’s no such thing as an 'event loop 'error. You can get the Stack from the Exception in the App.UnhandledException event and that will tell you where the exception occurred.
It might be easier to post a sample project so we can see your code.
Is break On Exceptions checked in the Project menu? It sounds like you’re pausing execution after the exception.
What about making the child window a sheet or a modal so that there is no red dot to click; then dispose of it by a “Done” button that calls a timer or a method in the parent window.
Are you 100% sure there’s nothing in your Main Windows that tries to access something from the Child Window, after the Child Window has been closed?
The main window assigns a .text value to the child upon opening.
I did make a sort of “Done” Button that closes the child, with no issues or problems.
but this does not help find where that exception is taking place.
it also defeats the purpose of the red dot close icon.
I do not know if Break On Exception is checked in the Project menu, never did this, how would i go about doing this ?
[quote]App Error (Exception)
Should your app raise an exception while you are running in debug mode (and Project ? Break On Exceptions is checked), the debugger becomes active (this is called a Runtime Error). The source code where the exception was raised is displayed.[/quote]
Just make sure the menu is checked:
On Exceptions has been checked all this time.
here are screen shots of the run time
Are you calling close in the button action event as the very last thing, or making other calls after close?
Also, you mentioned a timer. Is the timer a property of the window that closed?