Carbon: TSaveDialog does not report FilterIndex
Original Reporter info from Mantis: jwdietrich @jwdietrich21
-
Reporter name: Johannes W. Dietrich
Original Reporter info from Mantis: jwdietrich @jwdietrich21
- Reporter name: Johannes W. Dietrich
Description:
With the Carbon widgetset TSaveDialog does not correctly set the FilterIndex property.
The following code works correctly with the Windows and GTK widgetsets:
SaveDialog1.FilterIndex := 1;
if SaveDialog1.Execute then
begin
theFileName := SaveDialog1.FileName;
case SaveDialog1.FilterIndex of
1: theDelimiter := kTab;
2: if DecimalSeparator = ',' then
theDelimiter := ';'
else theDelimiter := ',';
3: theDelimiter := 'd';
4: theDelimiter := ' ';
end;
SimThyrLogWindow.SaveGrid(theFileName, theDelimiter);
end;
The SaveDialog1.Filter is set to 'Log (tab delimited)|*.tsv|Log (CSV)|*.csv|Log (DIF)|*.dif|Scenario (XML)|*.xml'.
With the Carbon widgetset, however, SaveDialog1.FilterIndex does not change according to user input, i.e. it remains at the default value set in the beginning of the code (here 1).
Mantis conversion info:
- Mantis ID: 20331
- Version: 0.9.30
- Fixed in revision: 32638 (#2c4a5c95)
- Monitored by: » @jwdietrich21 (Johannes W. Dietrich)