0

I'm developing a simple text editor app on OS X platform, which only has a single window containing a TextView. I want my app to be able to launch multiple copies simultaneously on one machine (to let user compare two files edited). This automatically works well on almost every machine except one. On this particular machine, the newest version of OS X is installed. I Googled around but could not find any clue why this may happen.

Detail 1: on this machine, when a new editor app is launched, the top bar displays "Window" instead of "Untitled" (which is the case on all other machines).

Detail 2: I have "Visible At Launch" checked for the main window. Before checking it, the particular machine cannot even launch one copy of the app (the app icon appears on the dock but the window never appears even if you click the app icon), which also does not happen on any other machine.

Can you offer any hint?

Zili FENG
  • 191
  • 11
  • By multiple copies, are you saying you made multiple copies of the application itself? That's really not the way to go. It sounds like you should be developing a Document-Based application. It will automatically open a new window multiple times to open more than one document. Xcode makes it very easy and straightforward. – ElmerCat Sep 09 '15 at 21:14
  • Yes, I am developing a document-based app. And Xcode does make it very easy and the product does work well on almost every machine. I'm just wondering why on the particular Mac my app does not behave the same. – Zili FENG Sep 10 '15 at 01:43

1 Answers1

1

If you want to develop a text editor, you should create a Cocoa document-based application.

A Cocoa document-based app use NSDocument's subclass to handle documents, such as autoSaving, opening a document, saving a document, undo manager, edit multiple document at the same time...

You see an example at my post. If your language is Objective C, take a look at this answer.

Community
  • 1
  • 1
Bao Nguyen
  • 137
  • 9