PageRenderTime 17ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/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
23@import <AppKit/CPArrayController.j>
24
25
26@implementation CPArrayController (NSCoding)
27
28- (id)NS_initWithCoder:(CPCoder)aCoder
29{
30    self = [super NS_initWithCoder:aCoder];
31
32    if (self)
33    {
34        _avoidsEmptySelection = [aCoder decodeBoolForKey:@"NSAvoidsEmptySelection"];
35        _clearsFilterPredicateOnInsertion = [aCoder decodeBoolForKey:@"NSClearsFilterPredicateOnInsertion"];
36        _filterRestrictsInsertion = [aCoder decodeBoolForKey:@"NSFilterRestrictsInsertion"];
37        _preservesSelection = [aCoder decodeBoolForKey:@"NSPreservesSelection"];
38        _selectsInsertedObjects = [aCoder decodeBoolForKey:@"NSSelectsInsertedObjects"];
39        _alwaysUsesMultipleValuesMarker = [aCoder decodeBoolForKey:@"NSAlwaysUsesMultipleValuesMarker"];
40        _automaticallyRearrangesObjects = [aCoder decodeBoolForKey:@"NSAutomaticallyRearrangesObjects"];
41    }
42
43    return self;
44}
45
46@end
47
48@implementation NSArrayController : CPArrayController
49{
50}
51
52- (id)initWithCoder:(CPCoder)aCoder
53{
54    return [self NS_initWithCoder:aCoder];
55}
56
57- (Class)classForKeyedArchiver
58{
59    return [CPArrayController class];
60}
61
62@end