Created
August 6, 2010 15:31
-
-
Save ColinCampbell/511492 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| volumeCount: SC.FormView.row(SC.LabelView, { | |
| layout: {height: 18, width: 50}, | |
| label: 'RANDOM' | |
| }) | |
| // this gets passed through to: | |
| row: function(label, fieldType, ext) | |
| { | |
| if (label.isClass) { | |
| ext = fieldType; | |
| fieldType = label; | |
| label = null; | |
| } | |
| // now, create a hash (will be used by the parent form's exampleRow) | |
| if (!ext) ext = {}; | |
| ext.label = label; | |
| ext.childViews = ["_singleField"]; | |
| ext._singleField = fieldType; | |
| return ext; | |
| } | |
| // The first if statement passes, so label is set to null. Makes sense, as you want to knock out that parameter | |
| // but in the next part, ext.label gets overwritten by label (null), so it doesn't use the passed value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment