I found a solution:
y_val = callback_value.(Ref(cb_data), model[:y])
z_val = callback_value.(Ref(cb_data), model[:z])
does the job (although I do not understand why the Ref(.) is needed).
I found a solution:
y_val = callback_value.(Ref(cb_data), model[:y])
z_val = callback_value.(Ref(cb_data), model[:z])
does the job (although I do not understand why the Ref(.) is needed).