Re: spurious Mountain View and Redwood City
Re: spurious Mountain View and Redwood City
- Subject: Re: spurious Mountain View and Redwood City
- From: Jonathan Jackel <email@hidden>
- Date: Sun, 15 Dec 2002 11:41:02 -0500
on 12/15/02 11:17 AM, email@hidden at email@hidden wrote:
>
On dimanche, dicembre 15, 2002, at 03:23 PM, matt neuburg wrote:
>
>
> I have a custom NSFormatter, and I had to write an exception handler
>
> because when my window opens, containing several interface items that
>
> use the formatter, before I put any data into the window, the
>
> formatter is bombarded with values like "Mountain View" and "Redwood
>
> City". Where the heck are these coming from? (Not my code, I assure
>
> you.) Is this some sort of Silicon Valley plot to take over the world?
>
> m.
>
>
To get an idea where the value are coming from:
>
>
Launch Interface Builder, create a new Application and add a
>
NSTableView to the window.
>
>
Now the question is what mysterious thing are you doing to get the
>
values used by Interface Builder in its NSTableView Data Source?
There's no real mystery. Just attach a formatter subclass to a table column
and log stringForObjectValue: and
getObjectValue:forString:errorDescription:. It appears that the cities are
init-ed into the table view. They show up for the first few calls to the
formatter. Then (I guess) the tableview asks for the real datasource to
start providing values and Redwood City, etc., disappear.
Jonathan
_______________________________________________
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.