This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Generating Fixtures with Code
The code below is taken from one of the SproutCore example projects. It demonstrates how to generate your fixtures with code — useful if you don’t want to type them all out by hand.
<pre>
// ==========================================================================
// SampleControls.Playlist Fixtures
// ==========================================================================
require(‘core’) ;
SampleControls.FIXTURES = SampleControls.FIXTURES.concat(function() {
var library = ‘Music,Movies,TV Shows,Podcasts,Radio,Ringtones’.split(‘,’); var store = ‘Store Purchased Downloads’.split(’ ’); var playlists =‘Shuffle,Christmas,Blues,Classical,Electronic,Jazz,’ + ‘New Music,Top 50 Most Played,Unrated,Chillout’.split(‘,’); var ret = [] ; var fadd = function(group, names, iconClassName) { for(var idx =0;idx<names.length;idx++) { ret.push({ guid: (group + idx).toString(), type: “Playlist”, group: group, name: names[idx], unreadCount: (idx % 4 > 2) ? 1000 : (idx % 4 > 1) ? 100 : (idx % 4 > 0) ? 1 : 0, iconClassName: iconClassName }) ; } } ; fadd(‘library’, library, ‘sc-icon-folder-16’) ; fadd(‘store’, store, ‘sc-icon-bookmark-16’) ; fadd(‘playlists’, playlists, ‘sc-icon-favorite-16’) ; return ret ;}()) ;






