Re: Changing Pointers Dynamically and Build Warnings
Re: Changing Pointers Dynamically and Build Warnings
- Subject: Re: Changing Pointers Dynamically and Build Warnings
- From: j o a r <email@hidden>
- Date: Sun, 26 Jan 2003 12:55:54 +0100
On Sunday, Jan 26, 2003, at 12:41 Europe/Stockholm, Simone Manganelli
wrote:
Do you call [tableView reloadData] after changing the data source?
Of course (it's in a different section), but that still doesn't solve
the problem, because the pointer for the dataSource still hasn't had
it's endpoint changed.
I know that I have done something like this, and it "just works":
- (NSMutableArray *) currentRows
{
if ([self isInSearchMode])
{
return [self matchingColumns];
}
else
{
return [self columnSubsetFromSelection];
}
}
- (int) numberOfRowsInTableView:(NSTableView *) tableView
{
return [[self currentRows] count];
}
As soon as isInSearchMode changes and the table view is reloaded, the
correct rows are used to populate the table view. Note that I don't
change the data source in the table view, I let the data source access
different internal sources of data for the table view.
IBOutlet MyCustomClass *myObject;
I have actually been doing that for some of the outlets, and it
doesn't help.
In that case you must have forgot to add the methods you are calling to
the public header of that class. If the methods aren't part of the
public interface of the class you will get warnings, but it will as you
point out, still work.
j o a r
_______________________________________________
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.