mirror of
https://github.com/PlayCover/PlayCover.git
synced 2026-04-26 16:25:54 +03:00
[GH-ISSUE #529] [Bug]: How to add a custom ContextMenuItem? #252
Labels
No labels
UI
app-support
bug
bug
documentation
duplicate
enhancement
game-support
good first issue
help wanted / caution
inactive
invalid
macos-beta
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/PlayCover#252
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lstarboy on GitHub (Nov 20, 2022).
Original GitHub issue: https://github.com/PlayCover/PlayCover/issues/529
Describe the bug
When I add a custom contextmenu item, I get a build error: Trailing closure passed to parameter of type 'ContextMenu?' that does not accept a closure ( Generic parameter 'MenuItems' coudl not be inferred). But I only add a custom menuitem copyed from a existing one, I still get a error. The source code(In the file PlayAppView line 59) like:
Button(action: {
app.showInFinder()
}, label: {
Text("playapp.showInFinder")
})
Button(action: {
app.sign() // change here
}, label: {
Text("playapp.showInFinder") // temp use the existing text
})
Steps to reproduce
Only add a custom menuitem at line 59 in PlayAppView copyed from a existing one(line 54-58), and change the action to app.sign(), save the file and build
Expected behaviour
No build error
Crash log
No response
What version of PlayCover are you using?
Nightly/beta
What version of macOS are you using?
Monterey (macOS 12)
Issue Language
@IsaacMarovitz commented on GitHub (Dec 29, 2022):
Issues are not a place to ask code-related questions.