I am developing a cocoa app for macOS and was manipulating the app's dock menu. I realize there are universal menu items such as "Options", "Show All Windows" and "Hide" in every app's dock menu.
In my case, those items/buttons do not work so I want to remove them. For example, "Options -> Keep In Dock" won't work because the executed application is a cloned one and will be deleted after quit(I know it is weird but that's what the app does).
Is there anyway that I can remove one or all of them? I think it might be impossible but a consultation won't do any harm.
Universal items I'm trying to remove
Or, can I set the callback of "Show All Windows" or "Hide" programmatically? Update: I just found applicationWillHide/DidHide to set the callback of "Hide" item. But seems like I can not abort or abort its hide process unless I set the "canHide" window I don't want hide to false.
There is no way to do this. They are inserted by the system and and you can not modify their behaviour.
Related
Let's say that I have a Button that I have assigned to a keyboard shortcut, like as shown:
Button("Example Button"){
print("pressed")
}
.keyboardShortcut("b")
This will allow me to add a button that I can trigger by doing command+B. However, this does not show up in macOS’s command bar at all, which is something I would like to add.
I have already considered using the .commands modifier and adding a command over there, but I would like to only manipulate a single window and I would be forced to use NotificationCenter or a centralized app storage variable, both of which manipulates all the windows of an app.
I have also attempted to use the commands thing with looking at which window is the key window, but that does not work reliably either and sometimes ends up manipulating the variables of multiple windows.
Is there a way to add a command bar shortcut for a Button that I have already assigned a keyboard shortcut to?
Ultimately, I found out that there was a focusedSceneObject thing that I could've used in order to remedy this issue. However, this seems to only be available in SwiftUI 4.
Is there any way to completely remove this message popup or move it to somewhere?
I already know why this message comes, but I do not want to disturb my activity with annoying info popup.
When it pops up it hides the document tab, so I have to close it every single time. (I do not want to know how to fix this particular error message, this screenshot is just an example.)
It's very annoying and I've searched around for a way to remove it, but the answers keep saying how to fix that particular error and not how to hide the popup itself.
Press ESC.
I agree that this is really annoying. VS Code is all about high-speed workflow and not having to interact with anything except your code via keyboard. Everything has key chords, e.g. CTRL-P and CTRL-SHIFT-P. So having to stop what I'm doing, go to the mouse, and dismiss this popup, whenever a background task feels like completing (and not even really then, because the popup actually appears some short time later) just so I can get visual confirmation of which file I'm currently coding in, to refocus my work after being distracted by the same popup, is really awkward. They are in a stupid location and don't even fade away after time like well-behaved toasts.
That said, I think that's really two parts; the distraction, and relatively high workflow cost to dismiss.
It helped me a lot to learn that it can be dismissed quickly and easily with the ESC key. The other half the problem I still haven't solved, but hope that helps you.
In the screenshot it shows trying to validate PHP.
In a VS Code window select File > Preferences > User Settings
An editor will open on the left called Default Settings and on the right with a file called settings.json
In the right side editor you can add settings that will override those found in the left-hand-side one.
Between the braces type:
// Whether php validation is enabled or not.
"php.validate.enable": false,
Then save the document.
VS Code will no longer attempt to validate PHP files.
You can override any of the defaults using this method.
You can use the same technique for each Workspace (or project folder) using File > Preferences > Workspace Settings
You can't disable the alert bar in general as VS Code needs to tell you things and doesn't (thankfully) use modal dialogs to communicate.
Go to File > preferences > settings
Then add this to your user settings
"editor.parameterHints": false
You may want to try adding the line
"extensions.ignoreRecommendations": true
to your VS Code settings file (which you can easily reach with the keystroke (CMD + ,) on a Mac OS X or macOS system.)
Solution: User Preferences > change "editor.parameterHints": true to "editor.parameterHints": false
This will at least remove the obstructive boxes that appear above the cursor.
After mild frustration with the difficulty to make top-level "plain old folders" within Eclipse for visual-organization purposes, I discovered that the thing I'm after is called a "working set". Hooray! But they don't seem to be rename-able, by any of the apparent avenues (right-clicking on it or using the Configure Working Sets window).
Is that just the way things are, since no one should be so lazy as to refuse making a new working set with the right name and transferring everything over? Or am I missing something obvious?
I also have a more minor question whose answer I already think I know. Can I tell a specific working set not to change its icon to have the "red X" when one of its children has an error? Nothing in the preferences under Debugging suggests to me the ability to turn off the automatic icon-changing. It's a useful feature, but I have a few simple practice projects with very basic errors, and I don't need the visual reminder to "fix" them, especially if they're in my "Practice" working set, whose icon I'd prefer not to change.
To rename a Working Set, you need to get to the dialogue of selecting a Working Set (click on the white down arrow at the top right of the package explorer > Configure Working Sets..), focus on your Working Set and click the "Edit" button. There, you can change the Working Set's name, as well as what's actually included in the Working Set.
There is no way (that I know of) to change the icon display to avoid showing the errors marker.
I have a lot of projects in my package view with a lot of resources(.java, .xml, .vm, .js, and so on) but I work only with several of them and the list could change with the time. I need a tool that allow me to filter quickly only selected files("my files") and back to a full projects list. I thought I can do that using working sets but I can't find a way to add and delete files from an existing working set.
Go to Window->Customize Perspective. In Command And Groups Availability tab enable Window Working Set option if not enabled. Click OK
Go to Window->Working Sets->Edit. A dialog will pop up. Click Edit button after selecting any working set.
I'm trying to achieve something similar to the "Clear History" and "Clear Cookies" cells in my apps settings (see screenshot):
I already have a few settings implemented that use toggle switches and Multi Value options.
When I edit my Root.plist the only options for an item are group, multi value, slider, text field, title & toggle switch. I'm pretty much trying to replicate the "Clear History" (ie press it once and clear an array), it doesn't store any settings or preferences, it's a one off event.
I hope that makes sense. How is this achieved?
Thanks for your help.
There is no way to do this (yet), so you'll have to find another solution.
You could simply use a switch and check it every time your app is started for this purpose and resetting the switch programmatically (since iOS4) :)
Unfortunately you can't do this. Apple have not exposed (or at least documented) the functionality. You'll either have to find some other way doing it (a toggle that causes the reset the next time the program is launched?) or just have the button in the app itself.