Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to let counter example compile #19

Merged
merged 2 commits into from
May 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions Examples/counter/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"object": {
"pins": [
{
"package": "StreamDeck",
"repositoryURL": "https://github.com/emorydunn/StreamDeckPlugin.git",
"state": {
"branch": "main",
"revision": "90f940adafe6fdc0db09ee8d6836ba8d7342eea8",
"version": null
}
},
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
Expand Down
6 changes: 3 additions & 3 deletions Examples/counter/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ let package = Package(
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(name: "StreamDeck", url: "https://github.com/emorydunn/StreamDeckPlugin.git", .branch("main"))
.package(path: "/Users/emorydunn/Repositories/StreamDeck/StreamDeckPlugin"),
.package(name: "StreamDeck", url: "https://github.com/emorydunn/StreamDeckPlugin.git", .branch("main")),
// .package(path: "path/to/this/repo/StreamDeck/StreamDeckPlugin"), // For local development
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.executableTarget(
name: "counter",
dependencies: [
.product(name: "StreamDeck", package: "StreamDeckPlugin"),
.product(name: "StreamDeck", package: "StreamDeck"),
]),
]
)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the controllers and encoder properties and instead conform the class to KeyAction.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class DecrementAction: Action {
PluginActionState(image: "Icons/actionDefaultImage", titleAlignment: .middle)
]

static var controllers: [ControllerType] = [.encoder]

static var encoder: RotaryEncoder? = nil;

var context: String

var coordinates: StreamDeck.Coordinates?
Expand Down
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the controllers and encoder properties and instead conform the class to KeyAction.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class IncrementAction: Action {
PluginActionState(image: "Icons/actionDefaultImage", titleAlignment: .middle)
]

static var controllers: [ControllerType] = [.encoder]

static var encoder: RotaryEncoder? = nil;

var context: String

var coordinates: StreamDeck.Coordinates?
Expand Down