Question

I am developing an application with an NSTabView with multiple NSTabViewItems. Each of the NSTabViewItems has a WebView subview. The WebView works as expected except when Flash or Silverlight are running in one of the WebViews. If, while Flash or Silverlight are running, a different tab is selected, the media will stop. When that tab is selected again, the media will restart. Is there any way around this (i.e. to allow the media to continue to run when a different NSTabViewItem is selected)? Does the NSTabViewItem send a message to its subviews when a different NSTabViewItem has been selected?

Was it helpful?

Solution

I'm not sure if this is why, but try check your webviews if their shouldUpdateWhileOffscreen is enabled. If it's enabled but the other tabs still doesn't load, then I'm guessing it's the design of the NSTabView, which is something on the lines of encoding it when the tab switches away, then decoding it when the user selects that tab again. In that case, I would probably do something like having a NSTabView with empty views and put the WebViews as subviews of the content view, overlaying each other and set the WebViews as hidden/visible whenever another tabview is selected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top