3 ms·
It's mildly interesting to note that in practice essentially every GUI application on OS X is a singleton because the OS makes a strong distinction between appl
by frou_dh 13y ago
It's mildly interesting to note that in practice essentially every GUI application on OS X is a singleton because the OS makes a strong distinction between application instances and windows (compared to e.g. MS Windows where the distinction is muddy).
Launch TextEdit.app twice and there is still only one running instance of the application. If you want a second window, you open a second window.
# instance trivia:
$ open -n /path/to.app
- dllthomas 13y agoThis is why it's nice to be able to parameterize "these are the actions I want done" with "here's how you combine them".
- masklinn 13y agoThat's not being a singleton since you can have a second instance if you ask for it.
- kd0amg 13y agoFor example, http://i.imgur.com/Qti6A9i.png http://i.imgur.com/Qti6A9i.png
- frou_dh 13y agoOdd that the pair of you are nitpicking since I both said "in practice" and gave a command that could be used to produce that screenshot.
- masklinn 13y ago> Odd that the pair of you are nitpicking It's not nitpicking, half of the singleton's purpose is to only ever have a single instance.
- frou_dh 13y agoYou're still not telling me anything I don't know.
- masklinn 13y agoIf you knew it was wrong in the first place, why post it?
- frou_dh 13y agoI now realise I was providing reading comprehension training† † NOT, I REPEAT NOT, a literal course of training. I want to make it doubly clear that I did not certify anyone and can not be held responsible for any of their future actions vis-a-vis reading or comprehending.
- csmithuk 13y agoTell me about it. To get single instance behaviour on windows you have to piss around with global mutexes.