TableView sending messages to released data source
TableView sending messages to released data source
- Subject: TableView sending messages to released data source
- From: Beat Koch <email@hidden>
- Date: Tue, 9 Sep 2003 11:38:41 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have a window with a drawer and on the drawer content view, there is
a table view. My NSWindowController subclass is the delegate of the
window as well as the delegate and data source of the table view. When
running the application, everything works fine until I select a row in
the table view and then close the window. If I do this, the application
crashes because the table view sends a numberOfRowsInTableView: message
to myWindowController after myWindowController has been dealloced. I
can easily fix this with [tableView setDataSource:nil] in the
destructor of MyWindowController.
However, I would like to understand why this can happen in the first
place. I would have thought that if I close a window, either all the
controls in the window are released before the controller is released
or at least that these controls stop sending messages.
Regards, Beat
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.2
iQA/AwUBP12foezksbVDbluoEQIy7wCgulJnBq804YFukOZjpcve8Nh6hesAoKxr
qPebiKCZte9nV5hNatChV/Wd
=H93n
-----END PGP SIGNATURE-----
_______________________________________________
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.