Revision: 12267
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12267&view=rev
Author: amaxwell
Date: 2008-01-04 22:27:25 -0800 (Fri, 04 Jan 2008)
Log Message:
-----------
Load window in initializer instead of NSParameterAssert. We can no longer
execute critical code in assertions, and I should have caught this one.
Modified Paths:
--------------
trunk/bibdesk/BDSKTextImportController.m
Modified: trunk/bibdesk/BDSKTextImportController.m
===================================================================
--- trunk/bibdesk/BDSKTextImportController.m 2008-01-04 22:37:42 UTC (rev
12266)
+++ trunk/bibdesk/BDSKTextImportController.m 2008-01-05 06:27:25 UTC (rev
12267)
@@ -135,6 +135,9 @@
selector:@selector(handleBibItemChangedNotification:)
name:BDSKBibItemChangedNotification
object:nil];
+ // make sure the window is loaded immediately
+ [self window];
+ OBPOSTCONDITION([self window]);
}
return self;
}
@@ -190,7 +193,8 @@
- (void)beginSheetForPasteboardModalForWindow:(NSWindow *)docWindow
modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector
contextInfo:(void *)contextInfo{
// we start with the pasteboard data, so we can directly show the main
sheet
- NSParameterAssert([self window]); // make sure we loaded the nib
+ // make sure we loaded the nib
+ NSParameterAssert(nil != [self window]);
[self loadPasteboardData];
[super beginSheetModalForWindow:docWindow modalDelegate:modalDelegate
didEndSelector:didEndSelector contextInfo:contextInfo];
@@ -198,7 +202,8 @@
- (void)beginSheetForWebModalForWindow:(NSWindow *)docWindow
modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector
contextInfo:(void *)contextInfo{
// we start with a webview, so we first ask for the URL to load
- NSParameterAssert([self window]); // make sure we loaded the nib
+ // make sure we loaded the nib;
+ NSParameterAssert(nil != [self window]);
[self setShowingWebView:YES];
// remember the arguments to pass in the callback later
@@ -218,7 +223,8 @@
- (void)beginSheetForFileModalForWindow:(NSWindow *)docWindow
modalDelegate:(id)modalDelegate didEndSelector:(SEL)didEndSelector
contextInfo:(void *)contextInfo{
// we start with a file, so we first ask for the file to load
- NSParameterAssert([self window]); // make sure we loaded the nib
+ // make sure we loaded the nib
+ NSParameterAssert(nil != [self window]);
// remember the arguments to pass in the callback later
theModalDelegate = modalDelegate;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit