-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClippings.m
52 lines (39 loc) · 1020 Bytes
/
Clippings.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Clippings.m
// Clipyboard2
//
// Created by Graham Prichard on 10/03/11.
// Copyright 2011 Artisan Baker Pty Ltd. All rights reserved.
//
#import "Clippings.h"
@implementation Clippings
@synthesize clips = _clips;
@synthesize context = _context;
- (void)viewDidLoad {
// [super viewDidLoad];
// fetch
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription
entityForName:@"LocalClip" inManagedObjectContext:_context];
[fetchRequest setEntity:entity];
NSError *error;
self.clips = [_context executeFetchRequest:fetchRequest error:&error];
//self.title = @"Clippings";
[fetchRequest release];
}
- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
}
return self;
}
- (void)drawRect:(NSRect)dirtyRect {
// Drawing code here.
}
- (void) dealloc {
self.clips = nil;
self.context = nil;
[super dealloc];
}
@end