Tests for observers on firstObject and lastObject of SC.Enumerable. #651

wants to merge 123 commits into


None yet

Failing test for #645.

lchambers and others added some commits Jun 9, 2011
lchambers Fix a logic error that causes duplicate sourceKeys to be added if exp…
…andedRecordTypes returns more than 1 record type.
@coolhand79 coolhand79 This is actually a more effecient way of getting the sourceKeys 8f7aa78
Luke Chambers Manually fixing segmented views ala pull request: sproutcore#509 fec2aed
Tim Evans experimental/menu: porting SC.MenuScrollView to use the new SC.Scroll…
Tim Evans experimental/menu: reduced framework to be just a rework of the scrol…
…ling components
Tim Evans frameworks/experimental: update scrollers with mouse wheel support on…
… scrollers
Tim Evans experimental/menu_scroll: menu scroll view enhancements:
 * views were always scrollable- now when the the content fills
   the view scrolling is disabled.
 * 'autohidesVerticalScroller' will now autohide both scrollers
   at a time. in combination with 'autohidesVerticalScrollers',
   you can have the option of having both scrollers visible at
   all times, disappearing scrollers, or none at all.
Tim Evans experimental/menu: added tests verifying correct scroll behavior 87062c3
Tim Evans experimental/menu: fixed render delegate `name` => `className` aa65675
Tim Evans experimental/menu: updated header on test 9ecd2bc
@hungle hungle Moved segment widths overflow calculation from render delegate to the…
… view itself and removed 'sc-segment-view' css dependency from the caluclation.
@mauritslamers mauritslamers pushRetrieve now updates primaryKey value of record + tests 9b339d8
@lukemelia lukemelia toOne and toMany will now throw an exception if passed an undefined r…

This can happen in real life due to a missing sc_require.
@hungle hungle Added support to handle vertical layout to segmented view and segment…
… view.
@oruen oruen Failing test case for SC.Event#commandCodes() with equal keyCode and …
…charCode on keypress.
@oruen oruen Properly handling equal keyCode and charCode on keypress event for We…
…bkit browsers.
@omghax omghax Add support for @each in destroyChain. 101513f
Tim Evans experimental/scroll_view: fixed render delegates to use 'className' 66d6e2a
Jiří Zajpt Fixed typo in SC.Query.build method.
Using multiple record types and conditions hash when calling
SC.Query.build method a wrong property name was used: recordsTypes
instead of recordType.
@bascht bascht - casting isError() return value to be YES or NO 653d447
@bascht bascht - fixed YES-casting for SC.RecordArray (see 653d447) 94e4ee5
@ColinCampbell ColinCampbell Fix display of SC.TextFieldView on Firefox f5d50b7
@wemrysi wemrysi [BUG] SC.String.loc() chokes on null/missing args 25c429d
@publickeating publickeating WhiteWhitespace. 26d3411
@publickeating publickeating On iPad it is possible that the timer set in touchStart() will not ha…
…ve yet fired and that touchEnd() will come in in the same Run Loop as the one that started with the call to touchStart(). The bad thing that happens is that even though we cleared this.touch, occasionally if touchEnd() comes in right at the end of the Run Loop and then the timer expires and starts a new Run Loop to call beginTouchesInContent(), that this.touch will STILL exist here. There's no explanation for it, and it's not 100% reproducible, but there is about a 40ms window where the firing timer and the end touch cause a crash. What happens is that if we try to capture the touch that has already ended, assignTouch() in RootResponder will check touch.hasEnded and throw an exception.

Could this get patched over to the experimental scrolling stuff?

Public Keating Merge pull request #544 from tim-evans/scroll_view_render_delegates
Scroll view render delegates


burrows and others added some commits Jul 28, 2011
@burrows burrows Adds a failing unit test that demonstrates an issue with referencing an
instantiated view inside an #if helper.
@ColinCampbell ColinCampbell Only apply classNameBindings and attributeBindings when rendering for…
… the first time, rather than updating
@ColinCampbell ColinCampbell Need to change location of attribute/classBinding additions again bec…
…ause of where Handlebars hooks into view rendering process
@SwadeDesigns SwadeDesigns Fixed Text Field Support
"Change" event didn't fire on a text field preventing value from
updating during focus. Changed to "keyup" event to allow live value
updating without switching focus.
@omghax omghax Add missing dependencies for experimental/split_view. 49a9279
@omghax omghax SplitView shouldn't call both removeChild and destroy. d7bf8af
@wemrysi wemrysi Merge remote-tracking branch 'upstream/master' 9660cfa
Public Keating Merge pull request #529 from tim-evans/menu_scroll
SC.MenuScrollView and SC.MenuScrollerView refactor
@publickeating publickeating Tests for nested scrolls (which work much better in this ScrollView (…
…after the following bug fixes) than in the default version)
@publickeating publickeating The displayProperty 'controlsId' wasn't being updated. 10f246d
@publickeating publickeating The find() needed to be restricted to the child container view only, …
…otherwise it alters the styles of nested scroll views that were rendered earlier. Plus made the chained binding observe one less object, since parentView should never change for a scroller.
@publickeating publickeating Not all browsers support the bind() function. 47c94a2
@onkis @etgryphon onkis updated number validator to not throw exception on null content 807e368
@bblatnick @etgryphon bblatnick Fixes for validators 1e572bb
@etgryphon etgryphon JSLint fix and Bug when you have overlapping drop targets...MainPane …
…targets are always on top
@etgryphon etgryphon Fixed a bug in the SparseArray API where a delegate will instantiate …
…a empty function for sparseArrayDidRequestIndexOf in the default case. This always falls back to looking locally
@etgryphon etgryphon Added a new property called 'informLocation' for when you want to set…
… the location of the browser without triggering the actual routing. Makes the use of 'statecharts' and 'routing ' much easier.
@etgryphon etgryphon Merge pull request #567 from SwadeDesigns/master
Fixed Text Field Support
@etgryphon etgryphon Merge pull request #551 from castaclip/master
corrected return values for SC.Record.isError() method
@etgryphon etgryphon Merge pull request #548 from jzajpt/fix_sc_query_build_typo
Fixed typo in SC.Query.build method.
@etgryphon etgryphon Merge pull request #536 from yappbox/fail_fast_on_undefined_record_type
Fail fast with a useful error when you pass toOne or toMany an undefined value
@etgryphon etgryphon Merge pull request #501 from coolhand79/master
Fixed a simple logic error in record array

Just out of curiosity- did this fix the bug you were talking about?


Yessir, just didn’t have time to reply again to the email. Safari doesn’t support bind and a few others, like older IE and FF, don’t as well: according to http://kangax.github.com/es5-compat-table/


That's really weird... Thanks, though! :D

publickeating and others added some commits Aug 4, 2011
@publickeating publickeating The touch deltas were always some crazy number, because they were sub…
…tracting the absolute start position from the relative current position. This meant that the ScrollView would always grab any dragging touches, even if they haven't actually passed the tolerance amount. This is particularly bad when you have nested ScrollViews, the inner ScrollView would never get a chance to scroll.
@publickeating publickeating There is still a nasty bug on iPad related to touch events with SC.Sc…
…rollView that I'm determined to fix, but until then if we're going to throw an exception about it, we should at least spell correctly.
@nuzelac nuzelac typo fix 5288b57
@wemrysi wemrysi Merge remote-tracking branch 'upstream/master' 75c4b2f
Michael Clift IE8 fix. 33ad79f
@publickeating publickeating Grammar 5ddb098
@publickeating publickeating Fix for "Attempt to assign touch that has already ended" related to S…
…crollView on iPad. The comment says it all.
@ColinCampbell ColinCampbell In SC.TextFieldSupport, update value and internal value separately to…
… ensure input value is not written unncessarily
@ColinCampbell ColinCampbell Remove keyup handling from TextFieldSupport. Because it hooks into th…
…e responder chain, it is unnecessary to provide extra code paths
@ColinCampbell ColinCampbell Accidentally checked in debugging code ca6fd88
@NicholasBoll NicholasBoll Removed duplicated logic. Template Collection tests pass. The if stat…
…ement is used for the dl test, which will fail without it
@NicholasBoll NicholasBoll Added ability for itemTagName attribute within the #collection block …
@NicholasBoll NicholasBoll Got over-zealous removing code. b076ee0
@sevifives sevifives Pushing value on sendAction 84870d1
@sevifives sevifives notEmpty was returning function() for .length on values that weren't …
…basic arrays
@lukemelia lukemelia Removed test file for SC.Editable mixin. The tests within were duplic…
…ates of tests found in SC.TextFieldView and were not testing responsibilities of SC.Editable.
@lukemelia lukemelia Failing test for case where isTextArea property of TextFieldView chan…

The issue is that when the property changes, the code necessarily updates the HTML but it attempts to attach events based on the HTML present in the DOM, resulting in a failure to wire up the change event properly. This case never arises if isTextArea is set statically at the time the TextFieldView is created. It arises if the property is changed after creation of the view, either manually or via a binding.
@lukemelia lukemelia Fix for the issue described in f382e38b3b94 related to how TextFieldV…
…iew handles a change to isTextArea. See extended commit message for potential breaking change.

As part of the bug fix, this change refactors responsibility for isTextArea completely into TextFieldView. Previously, it was awkwardly split by SC.FieldView and SC.TextFieldView. The change is fully compatible with the internal API, but if you have any application views that extend SC.FieldView and depend on the incomplete isTextArea logic in SC.FieldView, you will need to either extend from TextFieldView instead or implement your own support for isTextArea.
@wemrysi wemrysi Merge remote-tracking branch 'upstream/master' 39a4c2f
@wagenet wagenet Version bump - 1.7.0 851086c
@wagenet wagenet Version bump to 1.7.1.beta d79e364
@lukemelia lukemelia Fix bug where view was not preserving class names applied via classNa…
…meBindings when the layer is updated.
Jon Mulieri Resolving Issue #590, 'Hint not working properly for SC.TextFieldView…
… in IE'
@publickeating John Rogelstad Add support for emptyName property to emulate SC.SelectFieldView lega…
…cy behavior.
@publickeating John Rogelstad Fix typo found in submission 071f500
@publickeating John Rogelstad Fix typo on itemIsEnabledKey cf98e6f
@publickeating publickeating Simple test to verify that the emptyName becomes the default item whe…
…n there is no value.
@publickeating publickeating Remove whitespace 5a12184
@publickeating publickeating Added escapeHTML and fixed bug when emptyName is null and localize is…
… true.
Jeff Pittman Changed skip lines fec0d6c
@ialexi ialexi Merge pull request #593 from geojeff/master
Fix for skip settings in popover.css

Since this fixes, if we edit a labelView using the mixin SC.InlineEditable, and we clic out of the field to commit the changes, SC throw: Maximum call stack size exceeded !

Jeff Pittman and others added some commits Sep 5, 2011
Jeff Pittman added .middle { display: none } within theme(popover) to fix margin o…
…bscuring on picker panes
@ialexi ialexi Merge pull request #595 from geojeff/master
Fix for picker pane margin area, which was obscured for clicks
Jon Mulieri Merge remote branch 'upstream/master' b29d9f3
Jon Mulieri Adding unit test for issue #590 b3bb40f
John Rogelstad Add handling for empty name when value is changed from some value in …
…the list to null.
@wemrysi wemrysi Merge remote-tracking branch 'upstream/master' e175ae3
@ColinCampbell ColinCampbell Add support for text selection in SC.TextFieldSupport 1dcc289
Colin Campbell Merge pull request #599 from jrogelstad/master
Add handling for empty name when value is changed from some value in the list to null.
@ColinCampbell John Rogelstad If value object and list objects are both records, compare store key …
…to see if they are really the same thing.
@ColinCampbell ColinCampbell Clean up checking for equal records in SelectView 7e21a87
@ColinCampbell ColinCampbell Fix problem with InlineTextFieldView causing an infinite loop when it…
… was losing first responder. Also check to see if the target of an event is within the ITFV in root responder when automatically resiging its first responder
Colin Campbell Merge pull request #591 from jmulieri/master
Resolving Issue #590, 'Hint not working properly for SC.TextFieldView in IE'
Colin Campbell Merge pull request #589 from yappbox/classnamebindings_gix
Class names from classNameBindings should be preserved through updateLayer
Colin Campbell Merge pull request #587 from yappbox/textarea_bug
Textarea bug
Colin Campbell Merge pull request #585 from sevifives/master
Send value in sendAction on SegmentedView
Colin Campbell Merge pull request #583 from NicholasBoll/template-collection
Template #collection block helpers can now specify itemTagName.
Colin Campbell Merge pull request #576 from MikailCliftov/master
IE8 Fix
Colin Campbell Merge pull request #574 from nuzelac/patch-1
typo fix
Colin Campbell Merge pull request #557 from omghax/omghax/split-view
Fixed: error when calling SC.SplitView#destroy
Colin Campbell Merge pull request #565 from burrows/template-view-destroy-issue
instantiated views referenced from inside an #if block only get properly destroyed the first time they are removed
Colin Campbell Merge pull request #558 from wemrysi/master
Bugfix: SC.String.loc() chokes on null or missing interpolation arguments
Colin Campbell Merge pull request #541 from omghax/master
Resolved issue with removeObserver and @each
Colin Campbell Merge pull request #538 from oruen/keypress_with_equal_keycode_and_ch…

Keypress with equal keycode and charcode, refs #83
Colin Campbell Merge pull request #537 from hungle/master
Removed SC.SegmentedView dependency on 'sc-segment-view' CSS and added back support for a vertical layout direction missing ever since SC 1.5
Colin Campbell Merge pull request #535 from mauritslamers/empty
pushRetrieve now updates primaryKey value of record + tests
Wesley Workman Merge branch 'master', remote-tracking branch 'upstream/master' d62b0ff
@burrows burrows Ugh - undefined variable in a test. 8632305
@burrows burrows Adds failing unit tests to demonstrate issues with keyed SC.Record
@burrows burrows Fixes some datastore issues when using key values that are different
than association property names.
Wesley Workman Modified SC.DateTime to invoke class methods using 'this' instead of …
…'SC.DateTime'. This allows SC.DateTime to be extended for use in other apps and frameworks. Additionally added unit tests to verify it.
Public Keating Merge pull request #622 from workmanw/datetime
SC.DateTime should invoke class methods using 'this' instead of 'SC.DateTime'.
@publickeating publickeating Removed extra whitespace da1edb4
@publickeating publickeating Typo: property should be isMaster 8da391e
@publickeating publickeating Merge branch 'datastore-keyed-assoc-fixes' c6b42f8
Tim Evans fixed failing test
fix a test that tries to destroy an instantiated view multiple times.
note that this view will be appended / removed correctly, but it has
undocumented side-effects because SproutCore (as per convention)
requires uninstantiated views when defining view scaffolding
@publickeating publickeating SproutCore apps used to receive an `overflow: hidden` style on the bo…
…dy element by default unless otherwise configured in the Buildfile. That is no longer the case, but since drag and drop doesn't work properly for "regular" SproutCore apps without recognizing that body also needs to prevent overflow, we shall include it as a default style that can always be overridden.
Tim Evans runtime/system/run_loop: add `invokeNext` that will invoke a function…
… at the beginning of the next runloop
Tim Evans runtime/system/object: add `invokeNext` to SC.Object 10a5552
@etgryphon etgryphon Merge pull request #634 from tim-evans/invoke-next
Add invokeNext to run loops so there can be a guarantee that we can invoke in a new run loop
@geoffreyd geoffreyd Merge pull request #632 from tim-evans/if-helper-test-fix
Bad test in core_foundation - template views, #if helper
@sevifives sevifives [602] ENDS_WITH in SC.query returns wrong results 63e5492
@geoffreyd geoffreyd Merge pull request #640 from sproutcore/team/sevifives/master
[602] ENDS_WITH in SC.query returns wrong results
@aflatter aflatter Tests for observers on firstObject and lastObject of SC.Enumerable. 9e705fb
@aflatter aflatter Fix observers on firstObject and lastObject of SC.Enumerable. (#645) fc095fb

Just pushed a possible fix for this; not sure if there isn't a better way though.


start, length, and deltas are optional, so the computation in enumerableContentDidChange is bad


I fixed this up as @tim-evans noted, added some docs and pushed it to master.

Thanks a lot, sorry this sat unattended for so long...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment