How do you determine if an object has be constructed in Inno Setup Pascal Script?
问题 How do I check that my checkbox has been created / constructed and can be used to check if checked? [Code] var MyCheckBoxThatMayExistOrNot: TNewCheckBox; procedure Whatever(); begin { Check if MyCheckBoxThatMayExistOrNot exists and checked } if ????? and MyCheckBoxThatMayExistOrNot.Checked then begin ... end; end; TIA!! 回答1: Compare the variable value against nil: if (MyCheckBoxThatMayExistOrNot <> nil) and MyCheckBoxThatMayExistOrNot.Checked then An equivalent is use of Assigned function: if