This is the support explanation of why this error came showed up: The issue is specifically with the section: Evaluate@env[{{age, 100, "age"}, 10, 200, 1}] Manipulate doesn't really evaluate until it gets to the Initialization option, but it will check its input for correct form. Mathematica reads the main body of the Manipulate before running the Initialization option. This is can be verified by using a Print statement: Initialization -> (Print["Test"]; makeCustomEnvironmentAlt = Function[Null, Function[code, With @@ Hold[{##}, code], HoldAll], HoldAll]; env = makeCustomEnvironmentAlt[$age = 1, $salary = 2]; Print["Test"]) Test does not print. Getting around this will be probably not be clean. .... Having the code for the controller for age depend on evaluation of some function which must be initialized does not appear to be possible with simply Manipulate.
see how-to-define-constants-for-use-with-with-in-one-place-and-then-apply-them-lat