Sure. All these are controls or subclassed controls. It’s unlikely but not impossible for something to be nil. However it’s odd that the exception doesn’t catch it.
[code]If app.IsQuiting Then Return
Dim currentView As ViewData = uistate.GetCurrentState.ViewData
lbheader.Visible = False
// Move Sessionbox
If currentView.ShowFilters Then
// Move down to make way for filters
TheReportsContainer.Visible = True
theGraphAndLegend.Top = SegmentedChooser.top + SegmentedChooser.Height + 92 // Move graph out of the way of report controls
SessionBox.top = SegmentedChooser.top + SegmentedChooser.Height + 92
SessionBox.AdjustHeight
Else
// Listbox top aligns with graph top
theGraphAndLegend.Top = SegmentedChooser.top + SegmentedChooser.Height + 20
SessionBox.top = theGraphandLegend.top -3
SessionBox.AdjustHeight
TheReportsContainer.Visible = False
End If
// Set bottom of graph
theGraphAndLegend.Height = Self.TrueWindow.Height - TheGraphAndLegend.top
// Sessionbox wide and showing details? Hide graph
If currentView.ShowDetails = True Then
TheGraphAndLegend.Visible = False
Else
TheGraphAndLegend.Visible = True
End If
If currentView.ShowDetails = True Then
// Show wide over top of invisible graph
SessionBox.width = theGraphandLegend.Left + theGraphandLegend.Width - SessionBox.Left
Else
// Summary with graph
SessionBox.width = theGraphandLegend.Left - 20 - SessionBox.Left
End If
lbheader.MoveHeader
lbheader.Visible = True
Exception err As RuntimeException
If err IsA EndException Or err IsA ThreadEndException Then
Raise err
End If
debug.Warning CurrentMethodName, 3, err
[/code]
And FYI, here’s the stack being called
[code]Full stack trace:
RuntimeRaiseException
RaiseNilObjectException
MainWindow.MainWindow.MoveControls%%o<MainWindow.MainWindow>
Delegate.IM_Invoke%%
Xojo.Core._CallLaterTimer.Event_Action%%o<Xojo.Core._CallLaterTimer>
_ZN10TimerImpCF15FireTimerActionEv
_ZN10TimerImpCF13TimerCallbackEv
CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
__CFRunLoopDoTimer
__CFRunLoopDoTimers
__CFRunLoopRun
CFRunLoopRunSpecific
RunCurrentEventLoopInMode
ReceiveNextEventCommon
_BlockUntilNextEventMatchingListInModeWithFilter
_DPSNextEvent
-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
XojoFramework$4551
XojoFramework$4552
Application._CallFunctionWithExceptionHandling%%op
_Z33CallFunctionWithExceptionHandlingPFvvE
XojoFramework$4551
-[NSApplication run]
RuntimeRun
REALbasic._RuntimeRun
_Main
main
Verbose stack trace:
2 OfficeTime 0x0000000103011614 App.Event_UnhandledException%b%oo + 4100
3 OfficeTime 0x0000000102bbc40b Application._CallFunctionWithExceptionHandling%%op + 475
4 XojoFramework 0x00000001049764bb _Z33CallFunctionWithExceptionHandlingPFvvE + 262
5 XojoFramework 0x00000001047f12a2 _Z29CocoaFinishApplicationStartupv + 2076
6 AppKit 0x00007fff3519175d -[NSApplication run] + 699
7 XojoFramework 0x000000010497482d RuntimeRun + 42
8 OfficeTime 0x0000000102cc8a23 REALbasic._RuntimeRun + 19
9 OfficeTime 0x0000000103fb1cd8 _Main + 536
10 OfficeTime 0x0000000103f9be03 main + 19
11 libdyld.dylib 0x00007fff64d80085 start + 1
[/code]