Debugger calling string methods on a window
Debugger calling string methods on a window
- Subject: Debugger calling string methods on a window
- From: Jonathan Jackel <email@hidden>
- Date: Sun, 20 Jun 2004 09:47:03 -0400
This seems bizarre. gdb appears to be sending -length and
-getcharacters:range: messages to the main window in my app. This
caused the app to raise an exception while being debugged.
I seem to have solved the problem by subclassing NSWindow and
implementing those methods so that they are forwarded to a dummy
string. I set the custom class of my main window to my new subclass.
This seems to satisfy gdb.
When I break in my implementation of these methods, I see
#0 0x022e1e08 in -[MyWindow length] at MyWindow.m:20
#1 0x8596d164 in _pbxgdb_cf_introspect_string
#2 0x000017f0 in <function called from gdb>
#3 0x0043c33c in -[MyController processBrownData:] at MyController.m:93
#4 0x92e77ac0 in -[NSApplication sendAction:to:from:]
#5 0x92e7e844 in -[NSControl sendAction:to:]
#6 0x92eb8abc in -[NSCell _sendActionFrom:]
#7 0x92e58500 in -[NSCell trackMouse:inRect:ofView:untilMouseUp:]
#8 0x92ec96cc in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:]
#9 0x92e8e904 in -[NSControl mouseDown:]
#10 0x92e02c60 in -[NSWindow sendEvent:]
#11 0x92df5324 in -[NSApplication sendEvent:]
#12 0x92dfd73c in -[NSApplication run]
#13 0x92eb9b80 in NSApplicationMain
#14 0x000f5f74 in main at main.m:13
Items #2 and #3 lead me to believe that gdb is making this call.
Does anyone have a more elegant solution or, even better, an
explanation?
Jonathan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.