O'Reilly logo

SproutCore Web Application Development by Tyler Keating

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Organizing panes using SC.Page

Since an application may have several different preconfigured panes and pages (that is, subclasses of SC.Pane), we need a means to organize them all. This is the purpose of the SC.Page object. But don't let the name confuse you. SC.Page is not a type of SC.View and has nothing to do with rendering the visual page. It is simply a storage object used to hold preconfigured but un-instantiated panes and views.

Using an SC.Page container gives your application an anchor point for looking up a particular view tree and retrieving it for use. This is convenient, but the real work of the page container is that it will only instantiate objects when they are accessed the first time, allowing you to avoid creating all your panes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required