JuHa;
I looked at your change to the source code and I might be a little brain dead right now, but it looks like your fix is not really a fix at all. Not in the sense that it doesn't work, but in the sense that it HIDES another problem that is actually existing.... Let me explain. You have the following source....
function ShowChooseKeySchemeDialog(var NewScheme: string): TModalResult;
65 var
66 ChooseKeySchemeDlg: TChooseKeySchemeDlg;
67 begin
68 ChooseKeySchemeDlg:=TChooseKeySchemeDlg.Create(nil);
69 ChooseKeySchemeDlg.KeymapScheme:=NewScheme;
70 Result:=ChooseKeySchemeDlg.ShowModal;
71 if Result=mrOk then
72 NewScheme:=ChooseKeySchemeDlg.KeymapScheme;
73 ChooseKeySchemeDlg.Free;
74 end;
75
76 { TChooseKeySchemeDlg }
77
78 procedure TChooseKeySchemeDlg.ChooseKeySchemeDlgCREATE(Sender: TObject);
79 begin
80 Caption:=lisKMChooseKeymappingScheme;
81 NoteLabel.Caption:=lisKMNoteAllKeysWillBeSetToTheValuesOfTheChosenScheme;
82 SchemeRadiogroup.Caption:=lisKMKeymappingScheme;
83
84 ButtonPanel.HelpButton.OnClick := @HelpButtonClick;
85
86 with SchemeRadiogroup.Items do begin
87 Clear;
88 // keep order of TKeyMapScheme
89 Add(lisKMLazarusDefault);
90 Add(lisKMClassic);
91 Add(lisKMMacOSXApple);
92 Add(lisKMMacOSXLaz);
93 // do not add custom
94 end;
95 end;
And your logic is to basically ..
1. create the dlg form
2. Set the KeyMapScheme
3. Show the dlg as modal
Pretty simple! But in the dlgCreate event, that is where you clear the items from the radiogroup, and then re-add them to ensure they are in a particular order (not sure why they would ever change), but so be it. So you rebuild the list in the DLGCREATE event handler. This event handler is executed BEFORE you set the KeyMapScheme (CORRECT)?? And thus, this line...
69 ChooseKeySchemeDlg.KeymapScheme:=NewScheme;
Get's executed AFTER the code that rebuilds the radiogroup list. The code that you removed the beginupdate and endupdate from.
RIGHT?
So, reguardless of the beginupdate/endupdate interactions, the setting of the KeyMapScheme basically sets the ITEMINDEX to the appropriate index. RIGHT? And so, it should not matter about the beginupdate or endupdate. ("should not") matter. So, if there IS a problem with beginupdate/endupdate in that it interferes with the setting of the ITEMINDEX, then I believe there is a much bigger problem going on here.
In otherwords, "why in the world would removing the begin/endupdate methods FIX a problem with setting the ITEMINDEX for that same radiogroup later on in execution time?"

DAvie