Steps to reproduce:
- Create a function definition of And:
- If you don't have it yet, go to the Api Sandbox wikilambda_edit API: http://localhost:8080/wiki/Special:ApiSandbox#action=wikilambda_edit&format=json&summary=New%20And%20type&token=%2B\
- In the zobject textbox paste the following and click "Make request":
{ "Z1K1": "Z2", "Z2K1": { "Z1K1": "Z6", "Z6K1": "Z0" }, "Z2K2": { "Z1K1": "Z8", "Z8K1": [ "Z17", { "Z1K1": "Z17", "Z17K1": "Z40", "Z17K2": "Z0K1", "Z17K3": { "Z1K1": "Z12", "Z12K1": [ "Z11", { "Z1K1": "Z11", "Z11K1": "Z1002", "Z11K2": "first input" } ] } }, { "Z1K1": "Z17", "Z17K1": "Z40", "Z17K2": "Z0K2", "Z17K3": { "Z1K1": "Z12", "Z12K1": [ "Z11", { "Z1K1": "Z11", "Z11K1": "Z1002", "Z11K2": "second input" } ] } } ], "Z8K2": "Z40", "Z8K3": [ "Z20" ], "Z8K4": [ "Z14" ], "Z8K5": "Z0" }, "Z2K3": { "Z1K1": "Z12", "Z12K1": [ "Z11", { "Z1K1": "Z11", "Z11K1": "Z1002", "Z11K2": "And" } ] } }
- Go to the createZObject special page: http://localhost:8080/wiki/Special:CreateZObject?view=zobject-editor
- Under "Contents" select the type "Implementation"
- Select the function "And"
- In the composition gray box, select the function "If"
- In "condition" select mode "arg"
- To create an argument reference you must now select "Argument reference" on the type selector
Observed behavior:
- When selecting function if, the value of Z14K2 is:
"Z14K2": { "Z1K1": "Z7", "Z7K1": "Z802", "Z802K1": { "Z1K1": "Z40", "Z40K1": "" }
- When selecting "condition" mode "arg", the value of the Z14K2 is (condition disappears completely):
"Z14K2": { "Z1K1": "Z7", "Z7K1": "Z802" }
- When selecting "argument reference" on the type selector, the value of Z14K2 is the correct one:
"Z14K2": { "Z1K1": "Z7", "Z7K1": "Z802", "Z802K1": { "Z1K1": "Z18", "Z18K1": "" } }
Expected behavior:
- When selecting "condition" mode "arg", the key for condition Z802K1 should already be filled by a Z1K1: Z18 such as this:
"Z14K2": { "Z1K1": "Z7", "Z7K1": "Z802", "Z802K1": { "Z1K1": "Z18", "Z18K1": "" } }
🤡Fun behavior🤡
- Click on the trash bin next to the "If" function used in the composition
- Start over again:
- Search and select "If"
- In the "condition" field, choose "arg" in the mode selector
- IT WORKS!!
- When reloading and starting from scratch, the behavior is unexpected, choosing "arg" clears the field. When removing the composition function and starting over again, it works as expected