Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8525529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:00:25+00:00 2026-06-11T08:00:25+00:00

I have a Container view that I am using as my main wrapper view,

  • 0

I have a Container view that I am using as my main wrapper view, in which other views are swapped in and out.

In Ember 0.9.8 this worked fine. However, now in Ember 1.0pre I get an error when I try to swap in a view that I had previously swapped out.

Here’s my basic code:

App.globalView = Ember.ContainerView.create({
  screenOne: App.screenOne.create(),
  screenTwo: App.screenTwo.create()
});

App.globalView.set('currentView', App.globalView.get('screenOne')); // <-- good
App.globalView.set('currentView', App.globalView.get('screenTwo')); // <-- good
App.globalView.set('currentView', App.globalView.get('screenOne')); // <-- BAD

I now get the error

Error: assertion failed: calling set on destroyed object
   ...from
   Ember.ContainerView.Ember.View.extend.initializeViews
    set(view, '_parentView', parentView);

I have an example of this at http://jsfiddle.net/SamFent/WmfTX/. In the jsFiddle, I don’t see the error but the previous view just fails to load.

Does anyone know what’s going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:00:26+00:00Added an answer on June 11, 2026 at 8:00 am

    Ember.ContainerView now destroys the view when it is unset, so it cannot be used as you want. Here is a fork of your fiddle that does what you want: http://jsfiddle.net/WmfTX/1/

    If you really need to avoid tearing down and recreating views, render both views and use the isVisible property to toggle visibility instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my main edit view I have 3 partial views that contain child data
I have a View that contains a ParentModel, which contains 2 Models. I only
I have a view that contains two NSTextFieldCell s. The size at which these
I have a hypothetical tree view that contains this data: RootNode Leaf vein SecondRoot
I'm developing an iOS 4 application. I have a main view that contains another
I have a view controller based app that contains several views that I display/hide
I have a container which switches its main content between several screen-sized panes. I'm
I have an NSBox set up in my main view that accepts drag and
I currently have a Container View Controller which is home to a button. When
I have a requirement to build 1 main App that houses other mini apps

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.