On 27 Jan 2009, at 2:05 AM, Maxwell, Adam R wrote:

> On 01/26/09 16:00, "Christiaan Hofman" <cmhof...@gmail.com> wrote:
>
>> Yes, but that's all about the window title, not the represented file.
>> I can only find one vague reference to the represented file, and as
>> soon as they get specific they forget to mention it.
>
> Well, for my original comment I was actually going off of the API  
> docs,
> which say this:
>
> "synchronizeWindowTitleWithDocumentName
> Synchronizes the displayed window title and the represented filename  
> with
> the information in the associated document."
>
> I think that's pretty clear in referring to "the represented  
> filename."
> Indeed, if you set a breakpoint on -[NSWindow setRepresentedURL:],  
> it's
> called from -[NSWindowController  
> synchronizeWindowTitleWithDocumentName].
>

And it's the one I was referring to. When it gets explicit, it  
completely misses it. And the method name is absolutely anti- 
suggestive. Moreover, my biggest point: how do I know this is THE way  
it happens, in other words, how do I know that overriding this method  
will not bite me somewhere else? The point is: the docs don't tell me,  
so it's just an assumption and a guess. We've run into the trap of  
making assumptions from the docs that later proved wrong often enough.  
That's why I think this really is a documentation bug: the docs should  
be explicit about what needs to be done to override the default  
behavior.

> Anyway, it's probably not worth this discussion; it was just a  
> suggestion
> that I thought might avoid future breakage.  (apologies to the users  
> list
> for dragging this out here)

As a case in point why I don't like making assumptions when the docs  
are not explicit: when you set the representedFilename to nil, you'll  
get a proxy icon for something weird like /path/to/home/path/to/app/~/ 
path/to/app.

Christiaan


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to