Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

App crashes with "cannot decode object of class (WebView)"



Hi

I have a custom NSWindowController with a WebView IBOutlet in it and am getting this error when trying to open the window

-[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (WebView)

The web view is just a plain vanilla view dragged from the IB palette. In IB, I set the "filesOwner" to my custom NSWindowController class and connected the fileOwner to the web view.

Does anyone see where I messed up?

Thanks in advance

Ken



Here's the interface for my custom controller

@interface MyController : NSWindowController
{
	NSURLRequest		*request;
	
	IBOutlet WebView	*webView;
}


Here's the init method for the window controller

- (id) init
{
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
NSString *path = [bundle pathForResource: @"WebPalette" ofType: @"nib"];
NSLog(@"nib path: %@", path);
if (self = [super initWithWindowNibPath: path owner: self])
{
NSURL *testURL = [NSURL URLWithString: @"http://www.apple.com/";];

NSLog(@"testURL: %@", testURL);


// app crashes right here but I suspect it's a delayed reaction from initWithWindowNibPath

		[self setShouldCascadeWindows: NO];
		[[self window] setFrameAutosaveName: @"WebPalette"];
		NSLog(@"About to show web view");
		[self show];
		
		NSLog(@"About to create NSURLRequest");
		request				= [[NSURLRequest alloc] initWithURL: testURL
											cachePolicy: NSURLRequestReloadIgnoringCacheData
											timeoutInterval: 60];
											
		NSLog(@"request: %@", request);
		
		[[webView mainFrame] loadRequest: request];
	}
	
	return self;
}

And here's the crash log

Thread 0 Crashed:
0 com.apple.Foundation 0x9282647f _NSRaiseError + 227
1 com.apple.Foundation 0x9284d23f +[NSException raise:format:] + 57
2 com.apple.Foundation 0x927e8250 _decodeObjectBinary + 2364
3 com.apple.Foundation 0x927e93cd -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1048
4 com.apple.Foundation 0x927e9b34 -[NSArray initWithCoder:] + 411
5 com.apple.Foundation 0x927e82e5 _decodeObjectBinary + 2513
6 com.apple.Foundation 0x927e78ce _decodeObject + 231
7 com.apple.AppKit 0x9328af83 -[NSView initWithCoder:] + 275
8 com.apple.Foundation 0x927e82e5 _decodeObjectBinary + 2513
9 com.apple.Foundation 0x927e78ce _decodeObject + 231
10 com.apple.AppKit 0x93296d84 -[NSWindowTemplate initWithCoder:] + 3092
11 com.apple.Foundation 0x927e82e5 _decodeObjectBinary + 2513
12 com.apple.Foundation 0x927e78ce _decodeObject + 231
13 com.apple.AppKit 0x932774dd -[NSNibConnector initWithCoder:] + 501
14 com.apple.AppKit 0x9328a99d -[NSNibOutletConnector initWithCoder:] + 373
15 com.apple.Foundation 0x927e82e5 _decodeObjectBinary + 2513
16 com.apple.Foundation 0x927e93cd -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1048
17 com.apple.Foundation 0x927e9b34 -[NSArray initWithCoder:] + 411
18 com.apple.Foundation 0x927e82e5 _decodeObjectBinary + 2513
19 com.apple.Foundation 0x927e78ce _decodeObject + 231
20 com.apple.AppKit 0x932762f4 -[NSIBObjectData initWithCoder:] + 2217
21 com.apple.Foundation 0x927e82e5 _decodeObjectBinary + 2513
22 com.apple.Foundation 0x927e78ce _decodeObject + 231
23 com.apple.AppKit 0x93275925 loadNib + 156
24 com.apple.AppKit 0x932753b9 +[NSBundle (NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 918
25 com.apple.AppKit 0x9327501a +[NSBundle (NSNibLoading) loadNibFile:externalNameTable:withZone:] + 164
26 com.apple.AppKit 0x933aed27 -[NSWindowController loadWindow] + 228
27 com.apple.AppKit 0x932a7a3b -[NSWindowController window] + 81
28 ...yourcompany.yourcocoabundle 0x2556396a -[XTWebPalette init] + 318 (XTWebPalette.m:21)
29 ...yourcompany.yourcocoabundle 0x2556154e -[XTension handleWebMenuCommand] + 80 (XTension.m:208)
30 ...yourcompany.yourcocoabundle 0x255614ab -[XTension handleMenuItemCommand:] + 99 (XTension.m:186)
31 ...yourcompany.yourcocoabundle 0x25560f02 HandleCommandCallback (xthandlecommandrec*) + 84 (XTension.m:42)
32 com.quark.QuarkXPress 0x00881d9c xtdocallback + 454
33 com.quark.QuarkXPress 0x0088273e xtcallback + 1176
34 com.quark.QuarkXPress 0x00159507 ProcessXTStuff(long&) + 63
35 com.quark.QuarkXPress 0x00160644 DoCommand(unsigned long, bool) + 166
36 com.quark.QuarkXPress 0x003b4422 docommand(long) + 26
37 com.quark.QuarkXPress 0x0019053b XPressCmdHandler (OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 495
38 com.apple.HIToolbox 0x92de0537 DispatchEventToHandlers (EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093
39 com.apple.HIToolbox 0x92ddfbdc SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304
40 com.apple.HIToolbox 0x92de6fbc SendEventToEventTarget + 56
41 com.apple.HIToolbox 0x92e67abd SendHICommandEvent (unsigned long, HICommand const*, unsigned long, unsigned long, unsigned char, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) + 405
42 com.apple.HIToolbox 0x92e9b8e6 ProcessHICommandWithContextAndModifiers + 60
43 com.apple.HIToolbox 0x92e9b884 SendMenuItemSelectedEvent + 128
44 com.apple.HIToolbox 0x92e9b79c FinishMenuSelection (MenuData*, MenuData*, MenuResult*, MenuResult*, unsigned long, unsigned long, unsigned long, unsigned char) + 122
45 com.apple.HIToolbox 0x92e80505 MenuSelectCore (MenuData*, Point, double, unsigned long, OpaqueMenuRef**, unsigned short*) + 515
46 com.apple.HIToolbox 0x92e7ffa6 MenuSelect + 100
47 com.apple.HIToolbox 0x92e7ff10 StandardMenuBarEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 104
48 com.apple.HIToolbox 0x92de0537 DispatchEventToHandlers (EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093
49 com.apple.HIToolbox 0x92ddfbdc SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304
50 com.apple.HIToolbox 0x92de6fbc SendEventToEventTarget + 56
51 com.apple.HIToolbox 0x92de79d9 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 2587
52 com.apple.HIToolbox 0x92de08ee DispatchEventToHandlers (EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2044
53 com.apple.HIToolbox 0x92ddfbdc SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304
54 com.apple.HIToolbox 0x92de6fbc SendEventToEventTarget + 56
55 com.apple.HIToolbox 0x92e2aeb3 ToolboxEventDispatcher + 81
56 com.apple.HIToolbox 0x92e298cb RunApplicationEventLoop + 165
57 com.quark.QuarkXPress 0x00189da4 main + 208
58 com.quark.QuarkXPress 0x00002e7a _start + 216
59 com.quark.QuarkXPress 0x00002da1 start + 41



_______________________________________________ Do not post admin requests to the list. They will be ignored. Webkitsdk-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.