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

showResult show variable name not the value #30

Open
chrysaora-achlyos opened this issue Jul 30, 2024 · 0 comments
Open

showResult show variable name not the value #30

chrysaora-achlyos opened this issue Jul 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@chrysaora-achlyos
Copy link

Describe the bug

import Shortcuts // dictionary() >> aDict setValue(key: k, value: "val", dictionary: aDict) >> bDict // repeatEach(bDict) { quicklook(input: RepeatItem) valueFor(key: "k", dictionary: RepeatItem) >> zname showResult(text: zname) } the _showResult_ statement simply shows the string "zname", not the value held in the variable named zname.

The similar code compiled in the AppStore version of Jellycuts output "val", the value stored in variable named zname. import Shortcuts dictionary(json: {"k": "val"}) >> aDict repeatEach(bDict) { valueFor(key: "k", dictionary: RepeatItem) >> zname showResult(text: zname) }

To Reproduce

Steps to reproduce the behavior:

  1. paste the code above into a.jelly
  2. run the command jelly a.jelly --export --out u_a.shortcut
  3. run the command shortcuts sign --mode anyone --input u_a.shortcut --output a.shortcut
  4. run the command open -a Shortcuts a.shortcut
  5. click the "Add Shortcut" button
  6. click to select the a Shortcut in Shortcuts
  7. click to open the selected shortcut
  8. run the shortcut with play icon on top right of shortcut
  9. observe "zname" displayed

Expected behavior

expect to see "val" displayed

Information

  • Device: [macBook Pro, 14-inch, 2021]
  • OS: [Sonoma 14.5]
  • Jellycuts Version [??? jelly command does not provide version info (/opt/homebrew/bin/jelly)]
  • Jailbroken? [No]

Additional context

an addition action was added to the shortcut output by jelly inside Shortcuts. The action was an additional show results action where the zname variable was selected from the GUI. Then Shortcut Source Tool was used to examine the shortcut. lines 82-87 are what was output by jelly and resulted in "zname" being displayed. lines 88-105 where the code created by shortcuts that displayed the value stored in the variable named zname.

82 {
83 "WFWorkflowActionIdentifier": "is.workflow.actions.showresult",
84 "WFWorkflowActionParameters": {
85 "Text": "zname"
86 }
87 },
88 {
89 "WFWorkflowActionIdentifier": "is.workflow.actions.showresult",
90 "WFWorkflowActionParameters": {
91 "Text": {
92 "Value": {
93 "string": "\uFFFC",
94 "attachmentsByRange": {
95 "{0, 1}": {
96 "OutputUUID": "6A647784-92A8-4B79-9647-12EF0B37B2A2",
97 "Type": "ActionOutput",
98 "OutputName": "zname"
99 }
100 }
101 },
102 "WFSerializationType": "WFTextTokenString"
103 }
104 }
105 },

@chrysaora-achlyos chrysaora-achlyos added the bug Something isn't working label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant