[OS X TeX] Two problems with TeXworks

Jonathan Kew jonathan at jfkew.plus.com
Wed Feb 23 14:20:05 EST 2011


On 23 Feb 2011, at 19:10, Alan T Litchfield wrote:
>> 
>> Yes; if the app is running but has no windows open, clicking the Dock icon ought to trigger the same response as launching the app when it's not running at all - by default, a new window, unless you change the startup action in the preferences.
>> 
> 
> Except that the application is already running and the Dock only provides a launch command when an icon is clicked. If it is not already launched then, then it will launch, but if it already running there is nothing to launch.

True, but IIRC in this case the Finder sends a "re-open" AppleEvent to the running application. So we just need to respond appropriately to that event.

> If a person is use to running Windows then I can see why it may be confusing where clicking on the red cross (I think) quits an application, but Mac OS X is not Windows.
> 
> When the icon in the Dock to launch the application was clicked, It Did The Right Thing. It launched the application. To insist that it should open a new window each time it is clicked Does the Wrong Thing, in fact if it is already running, clicking on it brings the application to the front - so, should it do both? Ugh messy.

Clicking on the Dock icon when the application is already running brings it to the front, yes. It should _also_ open a new window _only_ if the application has no windows open, not each time it is clicked.

(The same applies if you double-click the application itself in the Finder.)

JK





More information about the MacOSX-TeX mailing list