Skip to content

showResult show variable name not the value #30

@chrysaora-achlyos

Description

@chrysaora-achlyos

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 },

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions