[NSKeyedUnarchiver decodeObjectForKey:]:无法解码类的对象(IBCIImage)

时间:2013-11-21 06:20:33

标签: objective-c xcode macos cocoa xib

在xib中更改某些UI元素(NSButton)的位置后( Xcode 5 )。我在控制台(10.6及更高版本)上遇到异常,但视图已正确加载。

-[NSCoder(CACoderAdditions) CA_decodeObjectForKey:]: ignoring exception *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (IBCIImage)  

并在OSX 10.5上崩溃

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (IBCIImage)'

Thread 0 Crashed:
0   com.apple.CoreFoundation        0x91389e94 ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 4
1   libobjc.A.dylib                 0x931f4e3b objc_exception_throw + 40
2   com.apple.CoreFoundation        0x91389dcb +[NSException raise:format:arguments:] + 155
3   com.apple.CoreFoundation        0x91389e0a +[NSException raise:format:] + 58
4   com.apple.Foundation            0x90c0d14f _decodeObjectBinary + 2975
5   com.apple.Foundation            0x90c0c515 _decodeObject + 229
6   com.apple.QuartzCore            0x95c135d2 -[CIFilter initWithCoder:] + 316
7   com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
8   com.apple.Foundation            0x90c0c515 _decodeObject + 229
9   com.apple.QuartzCore            0x95d24260 -[NSCoder(CACoderAdditions) CA_decodeObjectForKey:] + 42
10  com.apple.QuartzCore            0x95d34ff0 CAObject_initWithCoder + 197
11  com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
12  com.apple.Foundation            0x90c0e62d -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1437
13  com.apple.Foundation            0x90c2f03a -[NSDictionary(NSDictionary) initWithCoder:] + 602
14  com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
15  com.apple.Foundation            0x90c0c515 _decodeObject + 229
16  com.apple.AppKit                0x92145c7c -[NSView initWithCoder:] + 1417
17  com.apple.AppKit                0x9217e3d8 -[NSControl initWithCoder:] + 58
18  com.apple.AppKit                0x92185b4d -[NSImageView initWithCoder:] + 725
19  com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
20  com.apple.Foundation            0x90c0e62d -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1437
21  com.apple.Foundation            0x90c0eaa9 -[NSArray(NSArray) initWithCoder:] + 425
22  com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
23  com.apple.Foundation            0x90c0c515 _decodeObject + 229
24  com.apple.AppKit                0x92145825 -[NSView initWithCoder:] + 306
25  com.apple.AppKit                0x92146cd8 -[NSCustomView initWithCoder:] + 695
26  com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
27  com.apple.Foundation            0x90c0c515 _decodeObject + 229
28  com.apple.AppKit                0x921469b4 -[NSResponder initWithCoder:] + 85
29  com.apple.AppKit                0x9214574a -[NSView initWithCoder:] + 87
30  com.apple.AppKit                0x92182813 -[NSProgressIndicator initWithCoder:] + 58
31  com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
32  com.apple.Foundation            0x90c0c515 _decodeObject + 229
33  com.apple.AppKit                0x9213fb1e -[NSNibConnector initWithCoder:] + 435
34  com.apple.AppKit                0x921445ef -[NSNibOutletConnector initWithCoder:] + 378
35  com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
36  com.apple.Foundation            0x90c0e62d -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1437
37  com.apple.Foundation            0x90c0eaa9 -[NSArray(NSArray) initWithCoder:] + 425
38  com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
39  com.apple.Foundation            0x90c0c515 _decodeObject + 229
40  com.apple.AppKit                0x9213e976 -[NSIBObjectData initWithCoder:] + 2308
41  com.apple.Foundation            0x90c0cba0 _decodeObjectBinary + 1520
42  com.apple.Foundation            0x90c0c515 _decodeObject + 229
43  com.apple.AppKit                0x9225c597 -[NSNib instantiateNibWithExternalNameTable:] + 750
44  com.apple.AppKit                0x9225c272 -[NSNib instantiateNibWithOwner:topLevelObjects:] + 277
45  com.apple.AppKit                0x9241af3b -[NSViewController loadView] + 243
46  com.apple.AppKit                0x9241ae1b -[NSViewController view] + 46
老pib:

<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
    <data>

在Xcode版本5.0(5A1412)(新Xib)中更改按钮位置后:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4510" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
    <dependencies>
        <deployment version="1050" defaultVersion="1050" identifier="macosx"/>
        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4510"/>
    </dependencies>
    <objects>
some data..

<animations>
                        <caTransition key="subviews">
                            <mutableData key="keyedArchiveRepresentation">
some_data

任何人都可以帮助我。

0 个答案:

没有答案