Re: 10.5.2 broke my open panel code!
Re: 10.5.2 broke my open panel code!
- Subject: Re: 10.5.2 broke my open panel code!
- From: Daniele Pizzoni <email@hidden>
- Date: Thu, 21 Feb 2008 14:47:31 +0100
Same issue here. This was present in 10.5.0, resolved in 10.5.1,
reappeared in 10.5.2
Clicking on Media > Photo in open panel crashes app:
Stack trace:
0 libobjc.A.dylib 0x91df46e8 objc_msgSend + 24
1 com.apple.AppKit 0x96d14c85 -
[NSTreeController_selectObjectsAtIndexPathsNoCopy:avoidsEmptySelection:sendObserverNotifications
:] + 377
2 com.apple.AppKit 0x96d176d3 -
[NSTreeController_selectObjectsAtIndexPaths:avoidsEmptySelection:sendObserverNotifications
:] + 86
3 com.apple.AppKit 0x96d17808 -[NSTreeController
setSelectionIndexPaths:] + 57
4 com.apple.iLifeMediaBrowser 0x202ba97b -
[ILMediaGroupsTreeController setSelectionIndexPaths:] + 132
5 com.apple.iLifeMediaBrowser 0x202b9d75 -
[ILMediaGroupsTreeController setAllGroups:] + 187
6 com.apple.iLifeMediaBrowser 0x202ba4a4 -
[ILMediaGroupsTreeController reloadAllGroups] + 466
7 com.apple.iLifeMediaBrowser 0x202b9ee9 -
[ILMediaGroupsTreeController
observeValueForKeyPath:ofObject:change:context:] + 241
8 com.apple.Foundation 0x9044458e NSKVONotify + 62
9 com.apple.Foundation 0x903c0f22 -
[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 546
10 com.apple.Foundation 0x903c515c __NSThreadPerformPerform
+ 476
11 com.apple.CoreFoundation 0x90bfa678 CFRunLoopRunSpecific +
3240
12 com.apple.CoreFoundation 0x90bfad18 CFRunLoopRunInMode + 88
13 com.apple.HIToolbox 0x91ef06a0
RunCurrentEventLoopInMode + 283
14 com.apple.HIToolbox 0x91ef03f2 ReceiveNextEventCommon +
175
15 com.apple.HIToolbox 0x91ef032d
BlockUntilNextEventMatchingListInMode + 106
16 com.apple.AppKit 0x9670d7d9 _DPSNextEvent + 657
17 com.apple.AppKit 0x9670d08e -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
18 com.apple.AppKit 0x967060c5 -[NSApplication run] + 795
19 biz.datamind.jade 0x0000bd5e main + 547 (main.m:161)
20 biz.datamind.jade 0x000020a6 start + 54
Il giorno Feb 15, 2008, alle ore 3:33 AM, Nathaniel Gottlieb-Graham ha
scritto:
I'm writing an application that prompts the user at one point to
select a movie or image. Under 10.5.1, navigating to the file in
the dialog box manually as well as clicking on those helpful little
"Photos" and "Movies" entries under the Media group at the bottom of
the source list both worked. However, upon upgrading to 10.5.2,
clicking on those quick collections in the source list causes my app
to hang indefinitely. The console reports several copies of:
[NSCFString stopObservingModelObject:]: unrecognized selector sent
to instance 0x1075330
…as well as s bunch of GC compatibility mismatch warnings due to a
couple of my installed inputManagers which never caused any problems
before. Here's the code that triggers the open panel for your
preusal:
- (IBAction)askForStartingFile:(id)sender {
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setAllowsMultipleSelection: NO];
[panel setCanChooseDirectories: NO];
[panel beginSheetForDirectory:nil
file:nil
types:[QTMovie movieFileTypes:QTIncludeStillImageTypes]
modalForWindow:[NSAppmainWindow]
modalDelegate:self
didEndSelector:@selector(openPanelDidEnd:
returnCode:
contextInfo:)
contextInfo:nil];
}
- (void)openPanelDidEnd:(NSOpenPanel*)panel
returnCode:(int)returnCode
contextInfo:(void*)contextInfo {
if (returnCode == NSOKButton) {
QTMovie *newMovie = [QTMovie movieWithFile:[panel filename]
error:nil];
NSDocumentController *documentController = [NSDocumentController
sharedDocumentController];
// create the new document
MyDocument *currentDoc = [documentController
makeUntitledDocumentOfType:@"myProject" error:nil];
if (currentDoc) {
[documentController addDocument:currentDoc];
[currentDoc setMovie:newMovie];
[currentDoc makeWindowControllers];
[currentDoc updateChangeCount:NSChangeCleared];
[currentDoc showWindows];
} else {
NSRunAlertPanel(@"Could not make new document", @"Larger
explanation goes here", nil, nil, nil);
}
// Is there a better way to close this window? It looks sort of
dangerous.
[[[NSApp windows] objectAtIndex:0] close];
}
}
Any ideas?
Thanks,
Nathaniel_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden