I have created a custom Tool and registered it in $CDSHOME/tools/dfII/etc/tools.
I have a large form that I want to read and write env varibles to/from it's fields. So far I have been successful reading default values into the form using envGetVal, a very brute force approach. How do I automatically update env variables upon changes to the form fields?
I have tried callbacks using envSetVal however I get loading errors passing current values of a field when the form has not been created yet.
Any ideas or an easier way to do any of this would be great help!
I'm a little confused when you say the callbacks are failing when the form has not yet been created? How come your callbacks are running before your form is created? When I have done this for my forms, I set the form fields this way:field1= list(hiCreateBooleanButton( ?name 'fieldName ?value envGetVal("customTool" "varName") ?buttonText "My Button Text:") 0:0 100:30 0)Then my callback for the form sets all the variables using envSetVal. I could put a callback for each field if I wanted to. In either case, though, my form already exists before a callback is ever invoked.-Derek
I don't understand either - but perhaps hiInstantiateForm() is needed?Regards,Andrew.