| Page 1 of 1 | [ 3 posts ] |
|
I doubt this is an issue related to Model and ModelList but more likely an error in my coding, can anyone help.
I have a model list and calling each on the list to access each model, and then calling destroy on the item results in every other item being skipped, I guess this is because this list size is constently changing. This is what I am trying to do: modelList.getRelated("relationship").each( function(item,index) { item.destroy( {}, function(e) { if(!e) { Y.ModelStore.unregisterModel(item); } else { console.log(e); } });}); What would the correct way to do this be? Do I first need to extrapolate the models unique id into an array and iterate over this array to access the models instead? Thanks for any guidance Richard. |
|
was this a dumb question? I know there are obvious ways to do this, I guess I was just looking for some confirmation best practices.
|
|
You're right, it is an issue; luckily it has already been identified and fixed:
http://yuilibrary.com/projects/yui3/ticket/2531910 This fix will show up in 3.6.0 and it is already in 3.6.0pr1. |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group