sproutcore 1.10.1 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +8 -8
  2. data/CHANGELOG +13 -0
  3. data/VERSION.yml +1 -1
  4. data/lib/frameworks/sproutcore/CHANGELOG.md +69 -31
  5. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +14 -0
  6. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/object.js +14 -0
  7. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +7 -2
  8. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/platform.js +13 -9
  9. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/root_responder.js +57 -23
  10. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/enabled_states_test.js +24 -6
  11. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/animation.js +2 -2
  12. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/enabled.js +63 -13
  13. data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +3 -3
  14. data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +7 -1
  15. data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +28 -5
  16. data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +15 -0
  17. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +30 -3
  18. data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +23 -1
  19. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/many_attribute.js +135 -89
  20. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +12 -0
  21. data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +18 -6
  22. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/picker/ui.js +58 -20
  23. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/date_field/methods.js +1 -1
  24. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/select/methods.js +15 -1
  25. data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +1 -1
  26. data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +10 -0
  27. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +1 -1
  28. data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +24 -23
  29. data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +4 -0
  30. data/lib/frameworks/sproutcore/frameworks/experimental/frameworks/select_view/views/popup_button.js +10 -0
  31. data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +4 -4
  32. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +33 -16
  33. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_value_support.js +14 -6
  34. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +23 -18
  35. data/lib/frameworks/sproutcore/frameworks/foundation/system/user_defaults.js +4 -4
  36. data/lib/frameworks/sproutcore/frameworks/foundation/tests/delegates/inline_text_field/inline_text_field.js +1 -0
  37. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/auto_mixin_tests.js +78 -0
  38. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/auto_resize_test.js +45 -1
  39. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/content_value_support/content.js +112 -58
  40. data/lib/frameworks/sproutcore/frameworks/foundation/tests/system/image_queue.js +2 -2
  41. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/transition_test.js +141 -0
  42. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +27 -2
  43. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +631 -593
  44. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_fade_color_transition.js +5 -0
  45. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_move_in_transition.js +5 -0
  46. data/lib/frameworks/sproutcore/frameworks/foundation/transitions/swap_reveal_transition.js +68 -1
  47. data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +128 -49
  48. data/lib/frameworks/sproutcore/frameworks/foundation/views/field.js +33 -8
  49. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +209 -187
  50. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +2 -2
  51. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +7 -0
  52. data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +34 -4
  53. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +0 -2
  54. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +68 -9
  55. data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +2 -1
  56. data/lib/sproutcore/rack/builder.rb +45 -25
  57. data/sproutcore.gemspec +1 -0
  58. metadata +17 -2
@@ -74,6 +74,11 @@ SC.mixin(SC.ContainerView,
74
74
  }
75
75
  });
76
76
  });
77
+ },
78
+
79
+ /** @private */
80
+ buildOutFromView: function (statechart, container, content, options, exitCount) {
81
+ // Do nothing.
77
82
  }
78
83
 
79
84
  }
@@ -98,6 +98,11 @@ SC.mixin(SC.ContainerView,
98
98
  didBuildOutFromView: function (container, content, options) {
99
99
  // Convert to a flexible layout (in case we never fully entered).
100
100
  content.adjust({ bottom: 0, right: 0, height: null, width: null });
101
+ },
102
+
103
+ /** @private */
104
+ buildOutFromView: function (statechart, container, content, options) {
105
+ // Do nothing.
101
106
  }
102
107
  }
103
108
 
@@ -29,6 +29,45 @@ SC.mixin(SC.ContainerView,
29
29
  */
30
30
  REVEAL: {
31
31
 
32
+ /** @private */
33
+ buildInToView: function (statechart, container, content, previousStatechart, options) {
34
+ // This transition is unique in that we have to wait for the previous
35
+ // content to finish building out entirely, before we can be considered
36
+ // fully entered.
37
+ // if (previousStatechart && previousStatechart.get('content')) {
38
+ // previousStatechart.addObserver('state', this, this.previousStateDidChange, statechart);
39
+ // }
40
+ },
41
+
42
+ /** @private */
43
+ // reverseBuildIn: function (statechart, container, content, options) {
44
+ // var nextStatechart = container._currentStatechart;
45
+
46
+ // // We were waiting for another view to remove itself previously, now
47
+ // // we are going out because someone else is coming in. If that someone
48
+ // // else was also going out, then we should stay put because they are
49
+ // // going to reverse.
50
+ // if (nextStatechart && nextStatechart.get('content')) {
51
+ // nextStatechart.addObserver('state', this, this.nextStateDidChange, statechart);
52
+ // }
53
+ // },
54
+
55
+ /** @private */
56
+ // previousStateDidChange: function (previousStatechart, key, alwaysNull, statechart) {
57
+ // if (previousStatechart.state === 'exited') {
58
+ // statechart.entered();
59
+
60
+ // // Clean up.
61
+ // previousStatechart.removeObserver('state', this, this.previousStateDidChange);
62
+ // }
63
+ // },
64
+
65
+ /** @private */
66
+ didBuildInToView: function (container, content, options) {
67
+ // Convert to a flexible layout.
68
+ content.adjust({ bottom: 0, right: 0, height: null, width: null, zIndex: null });
69
+ },
70
+
32
71
  /** @private */
33
72
  willBuildOutFromView: function (container, content, options, exitCount) {
34
73
  var frame = container.get('frame'),
@@ -79,10 +118,38 @@ SC.mixin(SC.ContainerView,
79
118
  }
80
119
  },
81
120
 
121
+ /** @private */
122
+ // reverseBuildOut: function (statechart, container, content, options) {
123
+ // var key, value;
124
+
125
+ // // Cancel the animation in place.
126
+ // content.cancelAnimation(SC.LayoutState.CURRENT);
127
+
128
+ // switch (options.direction) {
129
+ // case 'up':
130
+ // case 'down':
131
+ // key = 'top';
132
+ // value = 0;
133
+ // break;
134
+ // default:
135
+ // key = 'left';
136
+ // value = 0;
137
+ // }
138
+
139
+ // content.animate(key, value, {
140
+ // duration: options.duration || 0.2,
141
+ // timing: options.timing || 'ease'
142
+ // }, function (data) {
143
+ // if (!data.isCancelled) {
144
+ // statechart.entered();
145
+ // }
146
+ // });
147
+ // },
148
+
82
149
  /** @private */
83
150
  didBuildOutFromView: function (container, content, options) {
84
151
  // Convert to a flexible layout.
85
- content.adjust({ bottom: 0, right: 0, height: null, width: null, zIndex: null });
152
+ content.adjust({ top: 0, left: 0, bottom: 0, right: 0, height: null, width: null, zIndex: null });
86
153
  }
87
154
 
88
155
  }
@@ -279,6 +279,8 @@ SC.ContainerView = SC.View.extend(
279
279
  var contentStatecharts = this._contentStatecharts;
280
280
 
281
281
  // Exit all other remaining statecharts immediately. This mutates the array!
282
+ // This allows transitions where the previous content is left in place to
283
+ // clean up all previous content once the new content transitions in.
282
284
  for (var i = contentStatecharts.length - 2; i >= 0; i--) {
283
285
  contentStatecharts[i].doExit(true);
284
286
  }
@@ -292,6 +294,14 @@ SC.ContainerView = SC.View.extend(
292
294
 
293
295
  // Remove the statechart.
294
296
  contentStatecharts.removeObject(statechart);
297
+
298
+ // Once all the other statecharts have exited. Indicate that the current
299
+ // statechart is entered. This allows transitions where the new
300
+ // content is left in place to update state once all previous statecharts
301
+ // have exited.
302
+ if (contentStatecharts.length === 1) {
303
+ contentStatecharts[0].entered();
304
+ }
295
305
  },
296
306
 
297
307
  /** @private
@@ -318,16 +328,26 @@ SC.ContainerView = SC.View.extend(
318
328
  // Call doExit on all current content statecharts. Any statecharts in the
319
329
  // process of exiting may accelerate their exits.
320
330
  for (var i = contentStatecharts.length - 1; i >= 0; i--) {
321
- contentStatecharts[i].doExit();
331
+ var found = contentStatecharts[i].doExit(false, newContent);
332
+
333
+ // If the content already belongs to a content statechart reuse that statechart.
334
+ if (found) {
335
+ newStatechart = contentStatecharts[i];
336
+ newStatechart.set('previousStatechart', currentStatechart);
337
+ newStatechart.gotoEnteringState();
338
+ }
322
339
  }
323
340
 
324
341
  // Add the new content statechart, which will enter automatically.
325
- newStatechart = SC.ContainerContentStatechart.create({
326
- container: this,
327
- content: newContent,
328
- previousStatechart: currentStatechart
329
- });
330
- contentStatecharts.pushObject(newStatechart);
342
+ if (!newStatechart) {
343
+ newStatechart = SC.ContainerContentStatechart.create({
344
+ container: this,
345
+ content: newContent,
346
+ previousStatechart: currentStatechart
347
+ });
348
+
349
+ contentStatecharts.pushObject(newStatechart);
350
+ }
331
351
 
332
352
  // Track the current statechart.
333
353
  this._currentStatechart = newStatechart;
@@ -336,6 +356,11 @@ SC.ContainerView = SC.View.extend(
336
356
  });
337
357
 
338
358
 
359
+ // When in debug mode, core developers can log the container content states.
360
+ //@if(debug)
361
+ SC.LOG_CONTAINER_CONTENT_STATES = false;
362
+ //@endif
363
+
339
364
  /** @private
340
365
  In order to support transitioning views in and out of the container view,
341
366
  each content view needs its own simple statechart. This is required, because
@@ -385,32 +410,49 @@ SC.ContainerContentStatechart = SC.Object.extend({
385
410
  //
386
411
 
387
412
  entered: function () {
388
- if (this.state === 'entering') {
389
- this.gotoReadyState();
390
413
  //@if(debug)
391
- } else {
392
- SC.error('Developer Error: SC.ContainerView should not receive an internal entered event while not in entering state.');
414
+ if (SC.LOG_CONTAINER_CONTENT_STATES) {
415
+ var container = this.get('container'),
416
+ content = this.get('content');
417
+
418
+ SC.Logger.log('%@ (%@)(%@, %@) — entered callback'.fmt(this, this.state, container, content));
419
+ }
393
420
  //@endif
421
+
422
+ if (this.state === 'entering') {
423
+ this.gotoReadyState();
394
424
  }
395
425
  },
396
426
 
397
- doExit: function (immediately) {
427
+ doExit: function (immediately, newContent) {
398
428
  if (this.state !== 'exited') {
399
- this.gotoExitingState(immediately);
429
+ this.gotoExitingState(immediately, newContent);
400
430
  //@if(debug)
401
431
  } else {
402
- SC.error('Developer Error: SC.ContainerView should not receive an internal doExit event while in exited state.');
432
+ throw new Error('Developer Error: SC.ContainerView should not receive an internal doExit event while in exited state.');
403
433
  //@endif
404
434
  }
435
+
436
+ // If the new content matches our own content, indicate this to the container.
437
+ if (this.get('content') === newContent) {
438
+ return true;
439
+ } else {
440
+ return false;
441
+ }
405
442
  },
406
443
 
407
444
  exited: function () {
408
- if (this.state === 'exiting') {
409
- this.gotoExitedState();
410
445
  //@if(debug)
411
- } else {
412
- SC.error('Developer Error: SC.ContainerView should not receive an internal exited event while not in exiting state.');
446
+ if (SC.LOG_CONTAINER_CONTENT_STATES) {
447
+ var container = this.get('container'),
448
+ content = this.get('content');
449
+
450
+ SC.Logger.log('%@ (%@)(%@, %@) — exited callback'.fmt(this, this.state, container, content));
451
+ }
413
452
  //@endif
453
+
454
+ if (this.state === 'exiting') {
455
+ this.gotoExitedState();
414
456
  }
415
457
  },
416
458
 
@@ -426,20 +468,38 @@ SC.ContainerContentStatechart = SC.Object.extend({
426
468
  options = container.get('transitionSwapOptions') || {},
427
469
  transitionSwap = container.get('transitionSwap');
428
470
 
429
- // Assign the state.
430
- this.state = 'entering';
471
+ //@if(debug)
472
+ if (SC.LOG_CONTAINER_CONTENT_STATES) {
473
+ SC.Logger.log('%@ (%@)(%@, %@) — Entering (Previous: %@)'.fmt(this, this.state, container, content, previousStatechart));
474
+ }
475
+ //@endif
476
+
477
+ // If currently in the exiting state, reverse to entering.
478
+ if (this.state === 'exiting' && transitionSwap.reverseBuildOut) {
479
+ transitionSwap.reverseBuildOut(this, container, content, options);
431
480
 
432
- if (!!content) {
481
+ // Assign the state.
482
+ this.set('state', 'entering');
483
+
484
+ // Fast path!!
485
+ return;
486
+ } else if (content) {
433
487
  container.appendChild(content);
434
488
  }
435
489
 
490
+ // Assign the state.
491
+ this.set('state', 'entering');
492
+
436
493
  // Don't transition unless there is a previous statechart.
437
- if (!!previousStatechart && !!content && !!transitionSwap) {
438
- if (!!transitionSwap.willBuildInToView) {
494
+ if (previousStatechart && content && transitionSwap) {
495
+ if (transitionSwap.willBuildInToView) {
439
496
  transitionSwap.willBuildInToView(container, content, previousStatechart, options);
440
497
  }
441
- if (!!transitionSwap.buildInToView) {
498
+
499
+ if (transitionSwap.buildInToView) {
442
500
  transitionSwap.buildInToView(this, container, content, previousStatechart, options);
501
+ } else {
502
+ this.entered();
443
503
  }
444
504
  } else {
445
505
  this.entered();
@@ -454,31 +514,39 @@ SC.ContainerContentStatechart = SC.Object.extend({
454
514
  options = container.get('transitionSwapOptions') || {},
455
515
  transitionSwap = container.get('transitionSwap');
456
516
 
457
- if (!immediately && !!content && !!transitionSwap) {
458
- if (this.state === 'entering') {
459
- if (!!transitionSwap.buildInDidCancel) {
460
- transitionSwap.buildInDidCancel(container, content, options);
461
- }
462
- } else if (this.state === 'exiting') {
463
- if (!!transitionSwap.buildOutDidCancel) {
464
- transitionSwap.buildOutDidCancel(container, content, options);
465
- }
466
- }
517
+ //@if(debug)
518
+ if (SC.LOG_CONTAINER_CONTENT_STATES) {
519
+ if (!exitCount) { exitCount = this._exitCount = 1; }
520
+ SC.Logger.log('%@ (%@)(%@, %@) — Exiting (x%@)'.fmt(this, this.state, container, content, this._exitCount));
521
+ }
522
+ //@endif
523
+
524
+ // If currently in the entering state, reverse to exiting.
525
+ if (this.state === 'entering' && transitionSwap.reverseBuildIn) {
526
+ transitionSwap.reverseBuildIn(this, container, content, options);
527
+
528
+ // Assign the state.
529
+ this.set('state', 'exiting');
530
+
531
+ // Fast path!!
532
+ return;
467
533
  }
468
534
 
469
535
  // Assign the state.
470
- this.state = 'exiting';
536
+ this.set('state', 'exiting');
471
537
 
472
- if (!immediately && !!content && !!transitionSwap) {
538
+ if (!immediately && content && transitionSwap) {
473
539
  // Re-entering the exiting state may need to accelerate the transition, pass the count to the plugin.
474
540
  if (!exitCount) { exitCount = this._exitCount = 1; }
475
541
 
476
- if (!!transitionSwap.willBuildOutFromView) {
542
+ if (transitionSwap.willBuildOutFromView) {
477
543
  transitionSwap.willBuildOutFromView(container, content, options, exitCount);
478
544
  }
479
545
 
480
- if (!!transitionSwap.buildOutFromView) {
546
+ if (transitionSwap.buildOutFromView) {
481
547
  transitionSwap.buildOutFromView(this, container, content, options, exitCount);
548
+ } else {
549
+ // this.exited();
482
550
  }
483
551
 
484
552
  // Increment the exit count each time doExit is called.
@@ -495,11 +563,15 @@ SC.ContainerContentStatechart = SC.Object.extend({
495
563
  options = container.get('transitionSwapOptions') || {},
496
564
  transitionSwap = container.get('transitionSwap');
497
565
 
498
- if (!!content) {
499
- if (transitionSwap) {
500
- if (!!transitionSwap.didBuildOutFromView) {
501
- transitionSwap.didBuildOutFromView(container, content, options);
502
- }
566
+ //@if(debug)
567
+ if (SC.LOG_CONTAINER_CONTENT_STATES) {
568
+ SC.Logger.log('%@ (%@)(%@, %@) — Exited'.fmt(this, this.state, container, content));
569
+ }
570
+ //@endif
571
+
572
+ if (content) {
573
+ if (transitionSwap && transitionSwap.didBuildOutFromView) {
574
+ transitionSwap.didBuildOutFromView(container, content, options);
503
575
  }
504
576
 
505
577
  if (content.createdByParent) {
@@ -512,8 +584,11 @@ SC.ContainerContentStatechart = SC.Object.extend({
512
584
  // Send ended event to container view statechart.
513
585
  container.statechartEnded(this);
514
586
 
587
+ // Reset the exiting count.
588
+ this._exitCount = 0;
589
+
515
590
  // Assign the state.
516
- this.state = 'exited';
591
+ this.set('state', 'exited');
517
592
  },
518
593
 
519
594
  // Ready
@@ -523,17 +598,21 @@ SC.ContainerContentStatechart = SC.Object.extend({
523
598
  options = container.get('transitionSwapOptions') || {},
524
599
  transitionSwap = container.get('transitionSwap');
525
600
 
526
- if (content && transitionSwap) {
527
- if (!!transitionSwap.didBuildInToView) {
528
- transitionSwap.didBuildInToView(container, content, options);
529
- }
601
+ //@if(debug)
602
+ if (SC.LOG_CONTAINER_CONTENT_STATES) {
603
+ SC.Logger.log('%@ (%@)(%@, %@) — Entered'.fmt(this, this.state, container, content));
604
+ }
605
+ //@endif
606
+
607
+ if (content && transitionSwap && transitionSwap.didBuildInToView) {
608
+ transitionSwap.didBuildInToView(container, content, options);
530
609
  }
531
610
 
532
611
  // Send ready event to container view statechart.
533
612
  container.statechartReady();
534
613
 
535
614
  // Assign the state.
536
- this.state = 'ready';
615
+ this.set('state', 'ready');
537
616
  }
538
617
 
539
618
  });
@@ -168,14 +168,22 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
168
168
  this.setFieldValue(this.get('fieldValue'));
169
169
  }.observes('fieldValue'),
170
170
 
171
- /** @private
172
- after the layer is created, set the field value and observe events
171
+ /**
172
+ SC.View view state callback.
173
+
174
+ After the layer is created, set the field value and begin observing
175
+ change events on the input field.
173
176
  */
174
177
  didCreateLayer: function() {
175
178
  this.setFieldValue(this.get('fieldValue'));
176
179
  this._addChangeEvent();
177
180
  },
178
181
 
182
+ /**
183
+ SC.View state callback.
184
+
185
+ Removes the change event from the input field.
186
+ */
179
187
  willDestroyLayer: function() {
180
188
  SC.Event.remove(this.$input(), 'change', this, this._field_fieldValueDidChange);
181
189
  },
@@ -200,6 +208,8 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
200
208
  // Override these primitives in your subclass as required.
201
209
 
202
210
  /**
211
+ SC.RootResponder event handler.
212
+
203
213
  Allow the browser to do its normal event handling for the mouse down
204
214
  event. But first, set isActive to YES.
205
215
  */
@@ -209,7 +219,9 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
209
219
  return YES;
210
220
  },
211
221
 
212
- /** @private
222
+ /**
223
+ SC.RootResponder event handler.
224
+
213
225
  Remove the active class on mouseExited if mouse is down.
214
226
  */
215
227
  mouseExited: function(evt) {
@@ -218,7 +230,9 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
218
230
  return YES;
219
231
  },
220
232
 
221
- /** @private
233
+ /**
234
+ SC.RootResponder event handler.
235
+
222
236
  If mouse was down and we renter the button area, set the active state again.
223
237
  */
224
238
  mouseEntered: function(evt) {
@@ -227,8 +241,10 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
227
241
  return YES;
228
242
  },
229
243
 
230
- /** @private
231
- on mouse up, remove the isActive class and then allow the browser to do
244
+ /**
245
+ SC.RootResponder event handler.
246
+
247
+ On mouse up, remove the isActive class and then allow the browser to do
232
248
  its normal thing.
233
249
  */
234
250
  mouseUp: function(evt) {
@@ -239,7 +255,9 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
239
255
  return YES ;
240
256
  },
241
257
 
242
- /** @private
258
+ /**
259
+ SC.RootResponder event handler.
260
+
243
261
  Simply allow keyDown & keyUp to pass through to the default web browser
244
262
  implementation.
245
263
  */
@@ -264,16 +282,22 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
264
282
  return YES;
265
283
  },
266
284
 
267
- /** tied to the isEnabledInPane state */
285
+ /**
286
+ Override of SC.Responder.prototype.acceptsFirstResponder.
287
+
288
+ Tied to the `isEnabledInPane` state.
289
+ */
268
290
  acceptsFirstResponder: function() {
269
291
  if (SC.FOCUS_ALL_CONTROLS) { return this.get('isEnabledInPane'); }
270
292
  return NO;
271
293
  }.property('isEnabledInPane'),
272
294
 
295
+ /** @private */
273
296
  _addChangeEvent: function() {
274
297
  SC.Event.add(this.$input(), 'change', this, this._field_fieldValueDidChange);
275
298
  },
276
299
 
300
+ /** @private */
277
301
  // these methods use the validator to convert the raw field value returned
278
302
  // by your subclass into an object and visa versa.
279
303
  _field_setFieldValue: function(newValue) {
@@ -286,6 +310,7 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
286
310
  return ret ;
287
311
  },
288
312
 
313
+ /** @private */
289
314
  _field_getFieldValue: function() {
290
315
  var ret = this.getFieldValue() ;
291
316
  if (this.objectForFieldValue) ret = this.objectForFieldValue(ret);