ParentSplitView goes nil! Bug?

In the ToolbarPressed event handler of a detail view I tried the following to ‘save’ the final results:

// Reset detail view Dim blank As New BlankView Self.ParentSplitView.Detail = blank // Display new gun Dim gt As New GunTableView Self.ParentSplitView.Master = gt ' NilObjectException here!
The ParentSplitView is not nil until I change the detail view, then it becomes nil. Why would this occur?

The following is the code I used as a workaround that runs fine.

Dim v As iOSSplitView v = Self.ParentSplitView // Reset detail view Dim blank As New BlankView v.Detail = blank // Update master view Dim gt As New GunTableView v.Master = gt

Maybe if I had done these in reverse order it would have worked?

Why not make a new spit view and then use App.CurrentScreen.Content?

That was my first thought and I played with that for awhile without success. Couldn’t grok how to define the content without examples or forum threads about it. :wink:

There is an example at$CurrentScreen

Thanks. I saw this, but when I tried

App.CurrentScreen.Content = iPadScreen

it didn’t work and I couldn’t figure out how to define an iOSScreen and set the two views.

Try new iPadScreen. You must create an instance of it first.