• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -[NSWindowController window] fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[NSWindowController window] fails


  • Subject: Re: -[NSWindowController window] fails
  • From: Alexander Shmelev <email@hidden>
  • Date: Fri, 28 Nov 2008 23:40:31 +0300

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]; // BREAKPOINT 3
}


BREAKPOINT 2 is placed in awakeFromNib, but never called :(


Here is gdb output (point of interest is at line 175 - [theDialog window]):


(gdb) r
Starting program: /Applications/Image Capture.app/Contents/MacOS/Image Capture
Reading symbols for shared libraries ............................................................................. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
Reading symbols for shared libraries .. done
^C
Program received signal SIGINT, Interrupt.
0x9000b348 in mach_msg_trap ()
(gdb) source bp
Breakpoint 1 at 0x3f331bc: file /scanner/branches/powerpc/src/TWAIN_DS/ Source/TwainDSController.mm, line 173.
Breakpoint 2 at 0x3f6d5cc: file /scanner/branches/powerpc/src/TWAIN_DS/ Source/TwainDialog.mm, line 100.
Breakpoint 3 at 0x3f33244: file /scanner/branches/powerpc/src/TWAIN_DS/ Source/TwainDSController.mm, line 178.
(gdb) c
Continuing.


#
# Here I press button, which calls showUi first time
#
# theDialog = nil


Breakpoint 1, -[TwainDSController showUiAsModal:] (self=0x3a0470, _cmd=0x39f360, isModal=0 '\000') at /scanner/branches/powerpc/src/ TWAIN_DS/Source/TwainDSController.mm:173
173 if (!theDialog) {
(gdb) n
Current language: auto; currently objective-c++
174 theDialog = [[TwainDialog alloc] init];
(gdb) n
175 [theDialog window];
(gdb) n
0x9384bc1c in -[NSControl mouseDown:] ()
(gdb) n
Single stepping until exit from function -[NSControl mouseDown:],
which has no line number information.
0x9378d894 in -[NSApplication run] ()
(gdb) n
Single stepping until exit from function -[NSApplication run],
which has no line number information.


#
# Here I press button, which calls showUi again
#

Breakpoint 1, -[TwainDSController showUiAsModal:] (self=0x3a0470, _cmd=0x39f360, isModal=0 '\000') at /scanner/branches/powerpc/src/ Panasonic_MFS_DS/Source/TwainDSController.mm:173
173 if (!theDialog) {
(gdb)


Breakpoint 3, -[TwainDSController showUiAsModal:] (self=0x3a0470, _cmd=0x39f360, isModal=0 '\000') at /scanner/branches/powerpc/src/ TWAIN_DS/Source/TwainDSController.mm:178
178 [theDialog showWindow:self];
(gdb)





On 28.11.2008, at 23:07, Ken Thomases wrote:


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


_______________________________________________

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


References: 
 >-[NSWindowController window] fails (From: Alexander Shmelev <email@hidden>)
 >Re: -[NSWindowController window] fails (From: j o a r <email@hidden>)
 >Re: -[NSWindowController window] fails (From: Alexander Shmelev <email@hidden>)
 >Re: -[NSWindowController window] fails (From: j o a r <email@hidden>)
 >Re: -[NSWindowController window] fails (From: Alexander Shmelev <email@hidden>)
 >Re: -[NSWindowController window] fails (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Main Thread stoppin Background Thread
  • Next by Date: Re: -[NSWindowController window] fails
  • Previous by thread: Re: -[NSWindowController window] fails
  • Next by thread: Re: -[NSWindowController window] fails
  • Index(es):
    • Date
    • Thread