Re: No Reference to Table Column
Re: No Reference to Table Column
- Subject: Re: No Reference to Table Column
- From: Philip Dow <email@hidden>
- Date: Wed, 12 Oct 2005 10:58:18 +0200
Have been trying to post for some time but wasn't able to make it
through.
My solution is to connect each individual column to an IBOutlet. At
wakeFromNib, I retain each column. This appears to solve the problem,
at least on 10.4.2. When my window controller deallocates, I then
release each column. In the meantime, I can add and remove columns
from the table view as often as I need.
Whew! Much simpler that building each column in code.
-Phil
On 05.10.2005, at 16:11, Philip Dow wrote:
I have an IBOutlet connected to an NSTableColumn in my nib file. It
is possible to remove this column from the NSTableView during
runtime. The table's state is saved by way of the autosave name,
which I am setting in IB. When the program runs the next time, the
column does not appear in the view. All good.
There are times when I need to add that column back to the table, a
user preference type thing. However, trying to use the IBOutlet to
reinsert the removed column throws any number of errors. During
debug, I check the pointer to this column and it comes up as
various objects at various addresses, sometimes an NSString,
sometimes an NSNumber, sometimes nothing in particular, even though
it is typecast as an IBOutlet *NSTableColumn.
Does the reference to an IBOutlet column not function if the
table's autosave settings do not include that column, even though
the column is in the NIB file originally? If so, is there a way to
maintain a reference to this column regardless the autosave setting?
-Phil
http://phildow.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden