-
Notifications
You must be signed in to change notification settings - Fork 1
/
KinemeDocumentInfo.m
60 lines (45 loc) · 1.45 KB
/
KinemeDocumentInfo.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
53
54
55
56
57
58
59
60
#include "stdio.h"
#import "KinemeDocumentInfo.h"
@implementation KinemeDocumentInfo
+ (QCPatchExecutionMode)executionModeWithIdentifier:(id)fp8
{
return kQCPatchExecutionModeProcessor;
}
+ (BOOL)allowsSubpatchesWithIdentifier:(id)fp8
{
return FALSE;
}
+ (QCPatchTimeMode)timeModeWithIdentifier:(id)fp8
{
return kQCPatchTimeModeNone;
}
- (id)initWithIdentifier:(id)fp8
{
if(self=[super initWithIdentifier:fp8])
{
[[self userInfo] setObject:@"Kineme Document Info" forKey:@"name"];
}
return self;
}
- (BOOL)execute:(id)openglcontext time:(double)time arguments:(id)arguments
{
NSDocumentController *sdc=[NSDocumentController sharedDocumentController];
// NSDocument *d=[sdc currentDocument];
[outputCurrentDirectory setStringValue:[sdc currentDirectory]];
unsigned c=[[sdc documents] count];
if( c>0 )
{
NSDocument *d=[[sdc documents] objectAtIndex:0];
// NSFileManager *f=[NSFileManager defaultManager];
// seems to always return /
// [outputFileContent setStringValue:[f currentDirectoryPath]];
// [outputFileContent setStringValue: [NSString stringWithFormat:@"hi %u",c] ];
[outputDocumentDisplayName setStringValue:[d displayName]];
[outputDocumentModificationDate setStringValue:[[d fileModificationDate] description]];
[outputDocumentFileName setStringValue:[d fileName]];
[outputDocumentFileURL setStringValue:[[d fileURL] absoluteString]];
[outputDocumentIsEdited setBooleanValue:[d isDocumentEdited]];
}
return YES;
}
@end