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

Closed
wants to merge 123 commits into
from

Projects

None yet
@aflatter
Contributor

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.
ab7693f
@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…
…View
e40e705
Tim Evans experimental/menu: reduced framework to be just a rework of the scrol…
…ling components
780b51d
Tim Evans frameworks/experimental: update scrollers with mouse wheel support on…
… scrollers
934f2a7
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.
d6be00b
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.
ed2b421
@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…
…ecordType.

This can happen in real life due to a missing sc_require.
66eb5ea
@hungle hungle Added support to handle vertical layout to segmented view and segment…
… view.
dd91280
@oruen oruen Failing test case for SC.Event#commandCodes() with equal keyCode and …
…charCode on keypress.
df255f2
@oruen oruen Properly handling equal keyCode and charCode on keypress event for We…
…bkit browsers.
778ece0
@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.
eaf55a0
@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.
90178cf
@tim-evans
Member

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
2df1c37
@tim-evans
Member

Thanks!

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.
0c8e66f
@ColinCampbell ColinCampbell Only apply classNameBindings and attributeBindings when rendering for…
… the first time, rather than updating
acdd007
@ColinCampbell ColinCampbell Need to change location of attribute/classBinding additions again bec…
…ause of where Handlebars hooks into view rendering process
7e84bc7
@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.
3ecd5a8
@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
054d4b7
@publickeating publickeating Tests for nested scrolls (which work much better in this ScrollView (…
…after the following bug fixes) than in the default version)
ecbacd7
@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.
1d11f2a
@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
d88636e
@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
a8ba161
@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.
162b21a
@etgryphon etgryphon Merge pull request #567 from SwadeDesigns/master
Fixed Text Field Support
39c62dd
@etgryphon etgryphon Merge pull request #551 from castaclip/master
corrected return values for SC.Record.isError() method
5620c68
@etgryphon etgryphon Merge pull request #548 from jzajpt/fix_sc_query_build_typo
Fixed typo in SC.Query.build method.
49e8df6
@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
f04ab08
@etgryphon etgryphon Merge pull request #501 from coolhand79/master
Fixed a simple logic error in record array
b4c454d
@tim-evans
Member

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

Member

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/

Member

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.
8d85538
@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.
d34bc60
@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.
8cbe6e3
@ColinCampbell ColinCampbell In SC.TextFieldSupport, update value and internal value separately to…
… ensure input value is not written unncessarily
b19c85e
@ColinCampbell ColinCampbell Remove keyup handling from TextFieldSupport. Because it hooks into th…
…e responder chain, it is unnecessary to provide extra code paths
13c7a2b
@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
6937dcf
@NicholasBoll NicholasBoll Added ability for itemTagName attribute within the #collection block …
…helper
1de9ba0
@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
f94283a
@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.
d3e5383
@lukemelia lukemelia Failing test for case where isTextArea property of TextFieldView chan…
…ges.

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.
3b24ace
@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.
d0d96ce
@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.
b4598df
Jon Mulieri Resolving Issue #590, 'Hint not working properly for SC.TextFieldView…
… in IE'
9b119cb
@publickeating John Rogelstad Add support for emptyName property to emulate SC.SelectFieldView lega…
…cy behavior.
0f4f0d3
@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.
4c7b544
@publickeating publickeating Remove whitespace 5a12184
@publickeating publickeating Added escapeHTML and fixed bug when emptyName is null and localize is…
… true.
4e600f4
Jeff Pittman Changed skip lines fec0d6c
@ialexi ialexi Merge pull request #593 from geojeff/master
Fix for skip settings in popover.css
abf48a2
@nicolasbadia
Member

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
9088c63
@ialexi ialexi Merge pull request #595 from geojeff/master
Fix for picker pane margin area, which was obscured for clicks
1d7d8a1
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.
e67abf4
@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.
b5f35ad
@ColinCampbell John Rogelstad If value object and list objects are both records, compare store key …
…to see if they are really the same thing.
8a36caa
@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
ceaeda4
Colin Campbell Merge pull request #591 from jmulieri/master
Resolving Issue #590, 'Hint not working properly for SC.TextFieldView in IE'
c5662c1
Colin Campbell Merge pull request #589 from yappbox/classnamebindings_gix
Class names from classNameBindings should be preserved through updateLayer
b91ab58
Colin Campbell Merge pull request #587 from yappbox/textarea_bug
Textarea bug
e5e52c0
Colin Campbell Merge pull request #585 from sevifives/master
Send value in sendAction on SegmentedView
a6313ca
Colin Campbell Merge pull request #583 from NicholasBoll/template-collection
Template #collection block helpers can now specify itemTagName.
68bf1d6
Colin Campbell Merge pull request #576 from MikailCliftov/master
IE8 Fix
22103d5
Colin Campbell Merge pull request #574 from nuzelac/patch-1
typo fix
41389c5
Colin Campbell Merge pull request #557 from omghax/omghax/split-view
Fixed: error when calling SC.SplitView#destroy
c97ae71
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
dea8a7a
Colin Campbell Merge pull request #558 from wemrysi/master
Bugfix: SC.String.loc() chokes on null or missing interpolation arguments
8236876
Colin Campbell Merge pull request #541 from omghax/master
Resolved issue with removeObserver and @each
328be9c
Colin Campbell Merge pull request #538 from oruen/keypress_with_equal_keycode_and_ch…
…arcode

Keypress with equal keycode and charcode, refs #83
8b45bcf
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
936574c
Colin Campbell Merge pull request #535 from mauritslamers/empty
pushRetrieve now updates primaryKey value of record + tests
21d3543
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
relationships.
b338e0d
@burrows burrows Fixes some datastore issues when using key values that are different
than association property names.
80efcdb
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.
72d8cd3
Public Keating Merge pull request #622 from workmanw/datetime
SC.DateTime should invoke class methods using 'this' instead of 'SC.DateTime'.
9527030
@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
3b0a9d8
@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.
0620a2b
Tim Evans runtime/system/run_loop: add `invokeNext` that will invoke a function…
… at the beginning of the next runloop
6ff11ef
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
1a5d367
@geoffreyd geoffreyd Merge pull request #632 from tim-evans/if-helper-test-fix
Bad test in core_foundation - template views, #if helper
da38c67
@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
65fcc11
@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
@aflatter
Contributor

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

@tim-evans

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

@publickeating
Member

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