Re: Retained ivars being set to 0x0
Re: Retained ivars being set to 0x0
- Subject: Re: Retained ivars being set to 0x0
- From: "Sam Dunster" <email@hidden>
- Date: Thu, 22 Mar 2007 17:48:25 +1100
Hi all, I'm new to the whole cocoa scene.
I have created a Bonjour based game that opens a new window for every
connection a user double clicks on in a NSTableView that i fill with
local services.
I have a NSWindow created in IB and a NSWindowController linked to that.
I create the window by like this:
GameWindowController *windowController = [[GameWindowController
alloc] initWithConnection:handle name:[nameField stringValue]
asHost:NO];
[windowController showWindow:self];
Once the initialiser is called, i store the connection handle and the
name of the player in ivars.
I can successfully call those ivars inside the initialising method,
but as soon as it drops back out of the initialiser and the window
starts firing other events, like when someone tries to chat, i some of
the ivars for the window controller (like player name and the
connection handle) are set to 0x0, and so they are unusable.
I have tried retaining the ivars, and even the window controller
itself, but nothing I know from reading the memoray allocation info
for cocoa seems to help.
There are other ivars that are set to 0x0 as well, like _windowNibName
that are set properly in the init but not anywhere else.
Is there anything you can suggest i should try?
Thanks in advance, i've been trying to fix this for over a day now, given up,
Sam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden