0

How can I set the Delphi projects options FileDescription? when I try

ProjectOptions.Values['Keys'].SetOptionsValue('FileDescription', Title);

(title is a string)
I get invalid variant operation

zendar
  • 13,384
  • 14
  • 59
  • 75

1 Answers1

2

Read the comments above IOTAProjectOptions declaration in ToolsApi unit. Try something like this:

var
  Options: TStrings;
begin
  Options := TStrings(Integer(ProjectOptions.Values['Keys']));
  if Assigned(Options) then
    Options.Values['FileDescription'] := Title;
end;
Ondrej Kelle
  • 36,941
  • 2
  • 65
  • 128