Inconsistent Dictionary Referencing Problems

I had 3 lists of variables that were always referenced together in my code, so I simplified the code by changing to 2 dictionaries. The code I simplified is listed below:




When using this code, I always get the Not Found2 result. This makes 0 sense to me, considering it manages to get pass the first dictionary check and fails the second dictionary check with the same code but different dictionary and key. I checked using a notifer component and the key matched what was expected. How do I fix this?

I donot know Am i right or wrong.

See here if the result for found mean you set the value(ref 1) to empty string but there is no such logic(ref 2) you added in the procedure

Thanks for the suggestion. However I know its not a problem with ref 1 because that exact same problem also appears in the code above it and that code works. Also, ref 1 only should set the variable in a failure case, and it IS possible to set a variable, temporary or otherwise to an empty string. I'm not exactly sure what you mean in ref 2. Ref 2 is referring to my code comparing the value for the input key of the dictionary to a int value. I'm also 90% sure it is not relevant to this problem, and only included it in case the problem was with the local var. Neither of these solutions work for my problem.

You could "simplify" and use lists...

Regarding your original post's problem, I suggest this debugging technique to address the question of whether or not a component can be used as a key in a dictionary.

Add a couple of global variables for debugging purposes,

  • debug_component, and
  • debug_letter

for the lookup process.
Save the component and the first lookup result in the respective global variables, and pass the global variables down to the next step in your process.

That will leave you some GET variable blocks you can test with the Companion Do It facility immediately after a failed attempt.

Apply the Do It facility all over the place, to reconstruct where the process went wrong.

Let us know?

P.S. If your buttons are labelled with .Text values in the Designer, have you considered using the generic Any Button.Text block to skip the first dictionary lookup?