質問

I want to create button to another stack with code

I have two stack.And Stacks name is "AA" and "BB"

I want to create button in stack "BB" from stack "AA" with my code

on createDigits
  create button "test" of stack "BB"
end createDigits

Results: It's create in stack name "AA" and this error message:

enter image description here

役に立ちましたか?

解決

Here's one way to do what you want:

on createDigits
  set the defaultStack to "BB"
  create button "test"
end createDigits

他のヒント

What Mark said.

The "create" command only works on the current card. You therefore have to navigate to that card in order to use the command. Mark used the "defaultStack" command to navigate to the target stack. You could also:

lock screen.

go stack "BB".

create button "test".

go back

That sort of thing.

Craig Newman

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top