Open MFKoelmans opened 11 years ago
Agreed on all points. A few preliminary answers (I know, here rather than in a guide):
extend
ed or design
ed but NOT create
ed), and lazily instantiate them for you the first time you get
them. It's a fantastic thing for performance, and is absolutely a best practice, but it's ... yeah, there are no "pages" involved with SC.Page.SC.MainPane
. You can only have one MainPane active at a time, and adding one will remove another. My appplications tend to have one main MainPane, and probably a MainPane that's used as the splash-screen during app launch, but if your app has multiple sections (multiple pages, if you will) then having multiple MainPanes is appropriate. Other pane classes are used for things like tool pallets (think photoshop's drag-around toolset windows that hover over top of your workspace), and pop-up modal dialogues, including SC.AlertPane
, SC's convenience dialogue box class.So since making guides is easier now, we should definitely work on putting all this into a couple of guides. We should have guides for everything (with some organization of course). Thanks for the questions and ideas!
So SC.Page
has nothing to do with displaying things, just for 'easy access'?
Right. Think of it like optimized storage for your panes.
The sproutcore framework provides classes like
SC.Pane
andSC.Page
which probably work great, but how to swap those, and when to use which, is not clear to me.SC.routes
could be integrated into the guide on pages and panes as well, I've only seen a third party tutorial about this, using SC 1.4.2, which is, AFAIK outdated.