一个简单的文档编辑程序,在主菜单和右键菜单中同时有copy,cut,paste等操作,用ActionList实现,但是为什么主菜单上Item的自动enable/disable结果不正确?也就是说不是根据RichEdit有选择文本和无选择文本来自动变灰和恢复。而右键菜单总能正确显示状态,并且在点右键以后,再看主菜单又显示的是正确的。这是什么原因?ActionLIst的OnUpdate事件是这样的:procedure TMainForm.ActionList1Update(Action: TBasicAction;
  var Handled: Boolean);
begin
 { Update the status of the edit commands }
  EditCutCmd.Enabled := CurrRichEdit.SelLength > 0;
  EditCopyCmd.Enabled := EditCutCmd.Enabled;
  EditDeleteCmd.Enabled := EditCutCmd.Enabled;
  if CurrRichEdit.HandleAllocated then
  begin
    EditUndoCmd.Enabled := CurrRichEdit.Perform(EM_CANUNDO, 0, 0) <> 0;
    EditPasteCmd.Enabled := Clipboard.Hasformat(cf_text);
  end;
end;