Hallo, ich möchte eine Quartz-Animation aus meinem Bundle laden.
Wenn ich es mit dem absoluten Pfad mache, funktioniert es:
NSString *path = @"/Volumes/Encrypted/Programme/Cs/Own Desktop/WindowTest/True DeskTop.qtz";
Wenn ich es aber wie folgt versuche, scheitert es:
path = [[NSBundle mainBundle] pathForResource:@"True DeskTop" ofType:@"qtz"];
Was mache ich falsch? Ich habe beide Strings auch mal mit isEqualToString vergleichen lassen; sie besitzen den gleichen Inhalt.
P. S. : Die Fehlermeldung:
2012-10-11 14:33:46.561 2nd Background[1296:303] -[__NSCFDictionary length]: unrecognized selector sent to instance 0x1040442b0
2012-10-11 14:33:46.562 2nd Background[1296:303] -[__NSCFDictionary length]: unrecognized selector sent to instance 0x1040442b0
2012-10-11 14:33:46.566 2nd Background[1296:303] (
0 CoreFoundation 0x00007fff8ce410a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8a4e23f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8ced76ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
3 CoreFoundation 0x00007fff8ce2f5ce ___forwarding___ + 414
4 CoreFoundation 0x00007fff8ce2f3b8 _CF_forwarding_prep_0 + 232
5 QuartzComposer 0x00007fff913cc664 +[QCComposition compositionWithFile:] + 40
6 QuartzComposer 0x00007fff91462d50 -[QCView loadCompositionFromFile:] + 34
7 2nd Background 0x0000000100001d26 -[WTApp programModeChangeToFour:] + 102
8 AppKit 0x00007fff88e73a59 -[NSApplication sendAction:to:from:] + 342
9 AppKit 0x00007fff88fa0a3a -[NSMatrix sendAction:to:] + 130
10 AppKit 0x00007fff88e737eb -[NSCell _sendActionFrom:] + 138
11 AppKit 0x00007fff88e71cd3 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1855
12 AppKit 0x00007fff88e71521 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 504
13 AppKit 0x00007fff89179676 -[NSMatrix _mouseDownSimpleTrackingMode:] + 810
14 AppKit 0x00007fff8917abcc -[NSMatrix mouseDown:] + 328
15 AppKit 0x00007fff88e6860e -[NSWindow sendEvent:] + 6853
16 AppKit 0x00007fff88e64744 -[NSApplication sendEvent:] + 5761
17 AppKit 0x00007fff88d7a2fa -[NSApplication run] + 636
18 AppKit 0x00007fff88d1ecb6 NSApplicationMain + 869
19 2nd Background 0x0000000100001002 main + 34
20 libdyld.dylib 0x00007fff8eb9e7e1 start + 0
21 ??? 0x0000000000000003 0x0 + 3
)
Wenn ich es mit dem absoluten Pfad mache, funktioniert es:
NSString *path = @"/Volumes/Encrypted/Programme/Cs/Own Desktop/WindowTest/True DeskTop.qtz";
Wenn ich es aber wie folgt versuche, scheitert es:
path = [[NSBundle mainBundle] pathForResource:@"True DeskTop" ofType:@"qtz"];
Was mache ich falsch? Ich habe beide Strings auch mal mit isEqualToString vergleichen lassen; sie besitzen den gleichen Inhalt.
P. S. : Die Fehlermeldung:
2012-10-11 14:33:46.561 2nd Background[1296:303] -[__NSCFDictionary length]: unrecognized selector sent to instance 0x1040442b0
2012-10-11 14:33:46.562 2nd Background[1296:303] -[__NSCFDictionary length]: unrecognized selector sent to instance 0x1040442b0
2012-10-11 14:33:46.566 2nd Background[1296:303] (
0 CoreFoundation 0x00007fff8ce410a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8a4e23f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8ced76ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
3 CoreFoundation 0x00007fff8ce2f5ce ___forwarding___ + 414
4 CoreFoundation 0x00007fff8ce2f3b8 _CF_forwarding_prep_0 + 232
5 QuartzComposer 0x00007fff913cc664 +[QCComposition compositionWithFile:] + 40
6 QuartzComposer 0x00007fff91462d50 -[QCView loadCompositionFromFile:] + 34
7 2nd Background 0x0000000100001d26 -[WTApp programModeChangeToFour:] + 102
8 AppKit 0x00007fff88e73a59 -[NSApplication sendAction:to:from:] + 342
9 AppKit 0x00007fff88fa0a3a -[NSMatrix sendAction:to:] + 130
10 AppKit 0x00007fff88e737eb -[NSCell _sendActionFrom:] + 138
11 AppKit 0x00007fff88e71cd3 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1855
12 AppKit 0x00007fff88e71521 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 504
13 AppKit 0x00007fff89179676 -[NSMatrix _mouseDownSimpleTrackingMode:] + 810
14 AppKit 0x00007fff8917abcc -[NSMatrix mouseDown:] + 328
15 AppKit 0x00007fff88e6860e -[NSWindow sendEvent:] + 6853
16 AppKit 0x00007fff88e64744 -[NSApplication sendEvent:] + 5761
17 AppKit 0x00007fff88d7a2fa -[NSApplication run] + 636
18 AppKit 0x00007fff88d1ecb6 NSApplicationMain + 869
19 2nd Background 0x0000000100001002 main + 34
20 libdyld.dylib 0x00007fff8eb9e7e1 start + 0
21 ??? 0x0000000000000003 0x0 + 3
)