/Tools/nib2cib/NSArrayController.j

http://github.com/cacaodev/cappuccino · Unknown · 62 lines · 51 code · 11 blank · 0 comment · 0 complexity · a6e68cbe705b402b4a6cd38e817520e6 MD5 · raw file

  1. /*
  2. * NSArrayController.j
  3. * nib2cib
  4. *
  5. * Created by Ross Boucher.
  6. * Copyright 2010, 280 North, Inc.
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Lesser General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2.1 of the License, or (at your option) any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with this library; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. @import <AppKit/CPArrayController.j>
  23. @implementation CPArrayController (NSCoding)
  24. - (id)NS_initWithCoder:(CPCoder)aCoder
  25. {
  26. self = [super NS_initWithCoder:aCoder];
  27. if (self)
  28. {
  29. _avoidsEmptySelection = [aCoder decodeBoolForKey:@"NSAvoidsEmptySelection"];
  30. _clearsFilterPredicateOnInsertion = [aCoder decodeBoolForKey:@"NSClearsFilterPredicateOnInsertion"];
  31. _filterRestrictsInsertion = [aCoder decodeBoolForKey:@"NSFilterRestrictsInsertion"];
  32. _preservesSelection = [aCoder decodeBoolForKey:@"NSPreservesSelection"];
  33. _selectsInsertedObjects = [aCoder decodeBoolForKey:@"NSSelectsInsertedObjects"];
  34. _alwaysUsesMultipleValuesMarker = [aCoder decodeBoolForKey:@"NSAlwaysUsesMultipleValuesMarker"];
  35. _automaticallyRearrangesObjects = [aCoder decodeBoolForKey:@"NSAutomaticallyRearrangesObjects"];
  36. }
  37. return self;
  38. }
  39. @end
  40. @implementation NSArrayController : CPArrayController
  41. {
  42. }
  43. - (id)initWithCoder:(CPCoder)aCoder
  44. {
  45. return [self NS_initWithCoder:aCoder];
  46. }
  47. - (Class)classForKeyedArchiver
  48. {
  49. return [CPArrayController class];
  50. }
  51. @end