Change to NSViewComponentPeer


#1

I would like to recommend a change to NSViewComponentPeer to handle the ability to set a full image path. This way we can set the title of our window either using a full path to a file or just a regular title. If we put in a full path then you can option click on the title bar name to get to the directory of the file.

[code]void setTitle (const String& title)
{
JUCE_AUTORELEASEPOOL

    if (title.containsAnyOf("/"))
	{
		if (! isSharedWindow)
			[window setTitleWithRepresentedFilename: juceStringToNS (title)];
	}
	else{
		if (! isSharedWindow)
			[window setTitle: juceStringToNS (title)];
	}
	
	
}[/code]

#2

Nice indenting :slight_smile:

Yes, I’ve been meaning to let it handle filenames. Doing it like this would be the wrong approach, but I’ll add a method to ComponentPeer to let you give it a file.