pointer address changes for no reason
pointer address changes for no reason
- Subject: pointer address changes for no reason
- From: "Ewan Delanoy" <email@hidden>
- Date: Fri, 6 Apr 2007 18:43:47 +0200 (CEST)
- Importance: Normal
Hello all,
in my NSDocument-based app I have an NSPanel whose UI is defined in a nib
and is owned by an NSWindowController subclass. This panel contains
an NSTextField, corresponding to an IBOutlet called "numPagesField"
in the window controller, and that text field behaves strangely :
1) On startup, the numPagesField pointer is set correctly
<gdb snippet, when the program is inside the "windowDidLoad" method
of the window controller>
(gdb) po numPagesField
<NSTextField: 0x4a84c80>
2) Later in the program, numPagesField suddenly becomes invalid
(although non-nil) :
(gdb) po numPagesField
Cannot access memory at address 0x15
(gdb) p numPagesField
$1 = (class NSTextField *) 0x15
and this causes a crash later. What I don't understand here is why the
pointer address
changed ? The only method I invoke on numPagesField in my code is
setIntValue: . This should change the text field's content, but not the
pointer
address. Besides, numPagesField is the only ivar in the window controller
which displays this odd behaviour.
Ewan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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