macos

For macOS Cocoa, how do I specify a window or a rectangle on the screen for taking a screenshot?

ε祈祈猫儿з 提交于 2021-02-11 14:10:45
问题 I have written a macOS app for measuring image files, and I wish to add a feature for capturing screenshots. I wish for it to have a user interface for doing it much like what the macOS app "Preview" has. To use its screenshot function, one does File > Take Screenshot, and one gets a submenu with these options: From Selection... From Window... From Entire Screen "From Selection..." lets you select a rectangle on the screen by clicking and dragging. "From Window..." lets you select an app

Compiling Elmer FEM on macOS Mojave causes the fatal error: 'string.h' file not found

∥☆過路亽.° 提交于 2021-02-11 14:10:41
问题 I'm trying to follow these instructions to compile Elmer FEM on macOS Mojave Version 10.14.6 . However, when running the make install I get the error message: .../elmerfem/umfpack/src/umfpack/include/umf_internal.h:29:10: fatal error: 'string.h' file not found #include <string.h> ^~~~~~~~~~ 1 error generated. make[2]: *** [umfpack/src/umfpack/umfpack_zl_save_symbolic.c] Error 1 make[2]: *** Deleting file `umfpack/src/umfpack/umfpack_zl_save_symbolic.c' make[1]: *** [umfpack/src/umfpack

Compiling Elmer FEM on macOS Mojave causes the fatal error: 'string.h' file not found

筅森魡賤 提交于 2021-02-11 14:10:30
问题 I'm trying to follow these instructions to compile Elmer FEM on macOS Mojave Version 10.14.6 . However, when running the make install I get the error message: .../elmerfem/umfpack/src/umfpack/include/umf_internal.h:29:10: fatal error: 'string.h' file not found #include <string.h> ^~~~~~~~~~ 1 error generated. make[2]: *** [umfpack/src/umfpack/umfpack_zl_save_symbolic.c] Error 1 make[2]: *** Deleting file `umfpack/src/umfpack/umfpack_zl_save_symbolic.c' make[1]: *** [umfpack/src/umfpack

For macOS Cocoa, how do I specify a window or a rectangle on the screen for taking a screenshot?

前提是你 提交于 2021-02-11 14:09:15
问题 I have written a macOS app for measuring image files, and I wish to add a feature for capturing screenshots. I wish for it to have a user interface for doing it much like what the macOS app "Preview" has. To use its screenshot function, one does File > Take Screenshot, and one gets a submenu with these options: From Selection... From Window... From Entire Screen "From Selection..." lets you select a rectangle on the screen by clicking and dragging. "From Window..." lets you select an app

Assign Radio Group to Radio Buttons

元气小坏坏 提交于 2021-02-11 13:59:27
问题 I have several radio buttons I need to assign a radio group to it so that only one radio button is selectable at a time.There is no radio group option.I have tried Assigning a single action outlet to all buttons Putting all buttons in a custom view None of this works. 回答1: In the old days, NSMatrix was the class that provided the radio group behavior. If you look up the docs for that class, you'll find the following note: Use of NSMatrix is discouraged in apps that run in macOS 10.8 and later

Assign Radio Group to Radio Buttons

纵然是瞬间 提交于 2021-02-11 13:57:19
问题 I have several radio buttons I need to assign a radio group to it so that only one radio button is selectable at a time.There is no radio group option.I have tried Assigning a single action outlet to all buttons Putting all buttons in a custom view None of this works. 回答1: In the old days, NSMatrix was the class that provided the radio group behavior. If you look up the docs for that class, you'll find the following note: Use of NSMatrix is discouraged in apps that run in macOS 10.8 and later

In C, how do I install GL/glx.h , GL/gl.h and GL/glu.h on Mac OS

别等时光非礼了梦想. 提交于 2021-02-11 13:52:47
问题 I have some code which includes the headers GL/glx.h , GL/gl.h and GL/glu.h . I do not even know what these are, and Google is not a lot of help because there is so much noise in the search results. So (optionally) what are they, but more importantly, how do I install them on a Mac (Mac OS 10.15.4). I have installed other stuff using homebrew so that would be my preference. EDIT: By renaming the headers to OpenGL/glx.h etc, I can now find gl.h abd glu.h but not glx.h. This answer openGL glx.h

mac: command not found: mongod

泄露秘密 提交于 2021-02-11 13:46:29
问题 I installed mongodb by brew on my MacOS as the mongodb official documentation, but I tried to run MongoDB manually as a background process, use command "mongod --config /usr/local/etc/mongod.conf --fork". Then the terminal displayed the message is : command not found: mongo. Did I miss any steps? 回答1: The above error appears when mongodb executable is not included in the PATH environment variable. MongoDB gets installed to /usr/local/bin/mongod The command 'mongod --config /usr/local....'

mac: command not found: mongod

这一生的挚爱 提交于 2021-02-11 13:44:28
问题 I installed mongodb by brew on my MacOS as the mongodb official documentation, but I tried to run MongoDB manually as a background process, use command "mongod --config /usr/local/etc/mongod.conf --fork". Then the terminal displayed the message is : command not found: mongo. Did I miss any steps? 回答1: The above error appears when mongodb executable is not included in the PATH environment variable. MongoDB gets installed to /usr/local/bin/mongod The command 'mongod --config /usr/local....'

canceling print operating crashes Swift Mac desktop app

◇◆丶佛笑我妖孽 提交于 2021-02-11 13:41:20
问题 I have had a problem with printing a certificate with a background image and overlay text. My solution after much research is to convert a view to an image and print that and it works UNLESS the print dialogue is canceled then get a crash. I have tried many versions of the code, even a test app that only does the print function and always get the crash on canceling print. If the certificate is printed no apparent issues. following in one of many versions of the code I have tried, all with the