Setting CollectionController's "content" causes misobservations?
Reported by Asko Soukka | November 25th, 2008 @ 06:21 AM
Setting the "content" property on a CollectionController seem to trigger all its observers. It doesn't feel like wanted behavior for me.
See the test attached. It should Fail at least with SC 0.9.20 and Firefox 3.0.4 Linux.
Comments and changes to this ticket
-
Asko Soukka November 25th, 2008 @ 06:27 AM
- no changes were found...
-
Asko Soukka November 25th, 2008 @ 08:17 AM
Subject: [sproutcore] Re: Misobservations with CollectionController? Date: Tue, 25 Nov 2008 08:10:50 -0800
This is not a bug. The CollectionController, ObjectController, and ArrayController all act as proxies for their "content" object. For example, you could bind to the "title" property of an ObjectController. Whenever you set the "content" property on that controller, the "title" will change to the value of content.title.
When you change the content property on an object, all of its other property values may have changed. This is why this fires.
-Charles
-
-
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
SproutCore: JavaScript Application Framework
Source available from github
The Git repository resides at http://github.com/sproutit
Check out the current development trunk with:
git clone git://github.com/sproutit/sproutcore.git
Creating a bug report
When creating a bug report, be sure to include as much relevant information as possible. Post the code sample that causes the problem. Preferably, alter the unit tests and show through either changed or added tests how the expected behavior is not occuring.
Submitting Patches
Resist adding new tags, use the ones in the tag cloud already. If you are submitting a patch or a pull request from a fork, tag the ticket as a "patch". If you are submitting a new feature enhancement, tag it as "enhancement". If you are submitting a fix for a bug, tag it as "fix".
Thanks!
We're glad you're contributing. Feel free to drop by the Google Group as well to let us know you are involved.
