This is more of a curiosity than anything else, but ...
I have a (non-document) window whose title is set with
'setTitleWithRepresentedFilename:'. The title actually shown in the title bar
is the last path component of the file path, as expected.
I have an associated window whose title I'd like to be of the form "<base
window title> — Info".
However when I try to build this from the base window's displayed title, I
actually get a string with the file name and the path to the file, so I end up
with something of the form "<base window title> — <long path to the file> —
Info", which isn't really what I want.
The -[NSWindow title] documents this behavior ("If the title has been set using
setTitleWithRepresentedFilename:, this method returns the file’s path."), but
that leaves no way to get the actual displayed title.
Does anyone know of a way to get the actual displayed title?
Note:
1. As a work around, I am building the associated window title from the base
window's 'miniwindowTitle', but there's no guarantee I can see that ensures (in
the future) this will be what's displayed in the actual title bar of the base
window.
2. In the past, I've used [NSWindowController
windowTitleForDocumentDisplayName:] for this purpose, but that doesn't work in
this case, since there's no actual document.
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]