Re: -[NSWindowController window] fails

2008-11-30 Thread Alexander Shmelev
Hello, I have found that aforementioned issue exists only when Image Capture (Tiger) loads my TWAIN DS plugin. Other software (ReadIris, TWAINCocoaClient, ...) load my TWAIN DS plugin and show its dialog without problems. Image Capture (Leopard) also use my TWAIN DS plugin without any problems. A

Re: -[NSWindowController window] fails

2008-11-28 Thread Andy Lee
On Nov 28, 2008, at 10:12 AM, Alexander Shmelev wrote: - (id) init { if (![super initWithWindowNibName:@"Dialog"]) return nil; [self window]; // there is a lot of code here return self; } I haven't been following this thread, but I believe some

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Source: - (IBAction) showUi:(id)sender { if (!theDialog) { // BREAKPOINT 1 theDialog = [[TwainDialog alloc] init]; [theDialog window]; // I use this only to force nib load } [theDialog showWindow:self]; /

Re: -[NSWindowController window] fails

2008-11-28 Thread Ken Thomases
On Nov 28, 2008, at 12:58 PM, Alexander Shmelev wrote: [[TwainDialog alloc] init] returns not nil value, but when I call [theDialog window], there is error inside this method. Care to tell us what the error is? That is probably central to the issue. Regards, Ken ___

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Also using gdb I have found that awakeFromNib of TwainDialog is never called. On 28.11.2008, at 21:58, Alexander Shmelev wrote: On 28.11.2008, at 21:46, j o a r wrote: On Nov 28, 2008, at 9:12 PM, Alexander Shmelev wrote: I cut off code after [self window], originally it looks like fol

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
On 28.11.2008, at 21:46, j o a r wrote: On Nov 28, 2008, at 9:12 PM, Alexander Shmelev wrote: I cut off code after [self window], originally it looks like following: I suspected that you might have. In the future, please indicate this more clearly. Sorry, I promise to write code more

Re: -[NSWindowController window] fails

2008-11-28 Thread j o a r
On Nov 28, 2008, at 9:12 PM, Alexander Shmelev wrote: I cut off code after [self window], originally it looks like following: I suspected that you might have. In the future, please indicate this more clearly. I tried to call [NSWindowController window] outside init, but it fails.

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Hello, I cut off code after [self window], originally it looks like following: - (id) init { if (![super initWithWindowNibName:@"Dialog"]) return nil; [self window]; // there is a lot of code here return self; } I tried to call [NSWindowControl

Re: -[NSWindowController window] fails

2008-11-28 Thread j o a r
On Nov 28, 2008, at 2:06 AM, Alexander Shmelev wrote: I have NSWindowController which loads nib with following code: - (id) init { if (![super initWithWindowNibName:@"Dialog"]) return nil; [self window]; } I use [self window] to force nib load. This code perfec

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Hello, 1) I tried to load nib outside class using [NSBundle loadNibNamed:@"Dialog" owner:theDialog], but it loads window only when called twice. @interface Dialog : NSObject { } @end ... @interface AppController { Dialog* theDialog } - (void)foo; @end - (void) foo { if (!theDialog

Re: -[NSWindowController window] fails

2008-11-28 Thread Kyle Sluder
On Fri, Nov 28, 2008 at 5:06 AM, Alexander Shmelev <[EMAIL PROTECTED]> wrote: > - (id) init > { >if (![super initWithWindowNibName:@"Dialog"]) >return nil; >[self window]; > } 1) You never set self. Inside an initializer, you must always set self to the result of t

-[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Hello, I have NSWindowController which loads nib with following code: - (id) init { if (![super initWithWindowNibName:@"Dialog"]) return nil; [self window]; } I use [self window] to force nib load. This code perfectly works on Leopard(Intel), but [self window]