On 01/26/09 15:39, "Christiaan Hofman" <[email protected]> wrote:

>>> One reason for the swizzling was also because we use this in various
>>> windows (it really should be possible out-of-the-box to override the
>>> default behavior).
>> 
>> I think swizzling is used in a number of places for convenience
>> (I've done
>> it myself), but I'm currently of the opinion that category overrides
>> and
>> swizzling are too much of a maintenance headache.
>> 
> 
> They are, but there are also lots of places where I wouldn't know an
> alternative.

If it's added to fix a specific Apple bug, that's one thing...if it's
required to add a feature, that feature probably just shouldn't be added.
Zoom placard on PDFView comes to mind here.

> 
>>> Moreover, it needed to be overridden at this place,
>>> because we have zero control over when the proxy icon gets set by
>>> AppKit, this can come at any time. So even if we would make this
>>> change, AppKit could again change the proxy icon again whenever it
>>> likes.
>> 
>> If Apple is changing the window's represented title outside of
>> synchronizeWindowTitleWithDocumentName, then they're violating the API
>> contract.  Even at the Carbon level, the proxy icon is indirectly
>> set by
>> changing the file.
> 
> Which contract would that be? I could not find a clear description and
> guarantee on how the proxy icon is updated. Also the method name is
> definitely not suggesting what you say.

http://developer.apple.com/releasenotes/Cocoa/AppKitOlderNotes.html

"NSWindowController now has a public method called
synchronizeWindowTitleWithDocumentName which is called whenever the
NSDocument has changed in such a way that the window title needs updating.
Subclasses can override this if they want to change the way the window title
is constructed."

http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/Documents/Tasks/Su
bclassNSDocument.html

"To customize a document's window title properly, subclass
NSWindowController and override windowTitleForDocumentDisplayName:. If your
application requires even deeper customization, override
synchronizeWindowTitleWithDocumentName."


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

Reply via email to