macos

macOS Printing in Swift

£可爱£侵袭症+ 提交于 2021-02-10 14:32:21
问题 Please note this is not an iOS question. I have an NSView-based app (i.e. not document-based), and I’d like to bolt on a printing subsystem. I can get NSViews in my main controller to print ok. However, I want to have a special view constructed just for printing. The view should not show in the app’s window. The view contains two NSTextFields, two NSTextViews, and 5 labels. I cannot seem to figure out a way to do this. I have tried various forms of these examples: Add an NSView to my main

macOS Printing in Swift

自闭症网瘾萝莉.ら 提交于 2021-02-10 14:31:14
问题 Please note this is not an iOS question. I have an NSView-based app (i.e. not document-based), and I’d like to bolt on a printing subsystem. I can get NSViews in my main controller to print ok. However, I want to have a special view constructed just for printing. The view should not show in the app’s window. The view contains two NSTextFields, two NSTextViews, and 5 labels. I cannot seem to figure out a way to do this. I have tried various forms of these examples: Add an NSView to my main

Getting warning “include location '/usr/local/include' is unsafe for cross-compilation” every time I try to compile using `clang -Weverything`

泪湿孤枕 提交于 2021-02-10 14:19:41
问题 Apologies if this question isn't clear, I'm struggling to even start debugging this issue. I'm on macOS and I'm now getting the following error / warning every time I compile C programs using clang with -Weverything and -Werror flags: error: include location '/usr/local/include' is unsafe for cross-compilation [-Werror,-Wpoison-system-directories] Initially I thought this was an issue related to my code, but I discovered that this error now occurs with every program I try to compile. I've

How to source an external file in .bash_profile in OSX?

妖精的绣舞 提交于 2021-02-10 13:19:07
问题 I have defined some aliases in my .bash_profile file and aliases work as expected. e.g alias python-server="python -m SimpleHTTPServer 7070" And, When I open new terminal, typing python-server opens up a python server with current directory as root (or "/"). But I have around 10 aliases and I want to backup the aliases So I thought to create an external file which contain these aliases and am trying to source that file from .bash_profile like this source ~/personal/Dropbox/scripts/aliases.sh

MAC OS X alias folder/file do not persist on Windows

让人想犯罪 __ 提交于 2021-02-10 13:15:48
问题 I have one Folder and I have created an Alias (Short-cut) on my MAC OS Desktop. Now, when I copy that Alias from MAC OS to Windows, then it shows me a type of file as "File". Now if I again copy that Alias from Windows to Mac OS, then that alias is now Unix Executable file and Not an Alias. I have tried zipping that Alias, and still having the same issue. Is it possible to persist MAC Alias on Windows and when i copy that Alias back to Mac then it remains Alias. 回答1: Mac filesystems can

Ruby installation (2.2.2) fails in macOS Big Sur

假如想象 提交于 2021-02-10 13:15:39
问题 I am running into some trouble installing Ruby 2.2.2 on macOS Big Sur. Has anyone had a similar issue that they were able to resolve? Many thanks 🙏 Error: `Downloading openssl-1.0.2u.tar.gz... -> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16 Installing openssl-1.0.2u... Installed openssl-1.0.2u to /Users/findum/.rbenv/versions/2.2.2 Downloading ruby-2.2.2.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2

Ruby installation (2.2.2) fails in macOS Big Sur

淺唱寂寞╮ 提交于 2021-02-10 13:14:25
问题 I am running into some trouble installing Ruby 2.2.2 on macOS Big Sur. Has anyone had a similar issue that they were able to resolve? Many thanks 🙏 Error: `Downloading openssl-1.0.2u.tar.gz... -> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16 Installing openssl-1.0.2u... Installed openssl-1.0.2u to /Users/findum/.rbenv/versions/2.2.2 Downloading ruby-2.2.2.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2

Ruby installation (2.2.2) fails in macOS Big Sur

放肆的年华 提交于 2021-02-10 13:08:15
问题 I am running into some trouble installing Ruby 2.2.2 on macOS Big Sur. Has anyone had a similar issue that they were able to resolve? Many thanks 🙏 Error: `Downloading openssl-1.0.2u.tar.gz... -> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16 Installing openssl-1.0.2u... Installed openssl-1.0.2u to /Users/findum/.rbenv/versions/2.2.2 Downloading ruby-2.2.2.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2

Ruby installation (2.2.2) fails in macOS Big Sur

耗尽温柔 提交于 2021-02-10 13:08:10
问题 I am running into some trouble installing Ruby 2.2.2 on macOS Big Sur. Has anyone had a similar issue that they were able to resolve? Many thanks 🙏 Error: `Downloading openssl-1.0.2u.tar.gz... -> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16 Installing openssl-1.0.2u... Installed openssl-1.0.2u to /Users/findum/.rbenv/versions/2.2.2 Downloading ruby-2.2.2.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2

Ruby installation (2.2.2) fails in macOS Big Sur

匆匆过客 提交于 2021-02-10 13:08:10
问题 I am running into some trouble installing Ruby 2.2.2 on macOS Big Sur. Has anyone had a similar issue that they were able to resolve? Many thanks 🙏 Error: `Downloading openssl-1.0.2u.tar.gz... -> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16 Installing openssl-1.0.2u... Installed openssl-1.0.2u to /Users/findum/.rbenv/versions/2.2.2 Downloading ruby-2.2.2.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2