rentzsch/mogenerator — pull request #181 by JRG-Developer (2013-11-20 02:21:32+00:00)
Title: Added missing NSOrderedSet methods (insert, remove, replace, etc)

Added missing NSOrderedSet methods (insert, remove, replace, etc):

See Issue #75, comment by @batkuip "Those methods are trickier to implement because the mutable set accessor uses mutableSetValueForKey which seems to call the insertObject:atIndex internally causing it loop forever."

This code creates a temporary mutable set using the ordered set (not the mutable set which loops as noted), making sure to call appropriate KVC methods.

Credit for original code/idea goes to @Dmitry Makarenkoless and @JLust on StackOverFlow (http://stackoverflow.com/questions/7385439/exception-thrown-in-nsorderedset-generated-accessors).