Subject: ShortCut problem [Print This Page] Author:
dandcnpack Time: 2008-11-1 14:13 Subject: ShortCut problem
Hello.
Assigned ShortCut to any tool from ?Source Block Tools? does not work.
Unassigning ShortCut (for example try..finally..end [Alt Shift E]) also does not work — ShortCut remains working.
I checked it on just installed Delphi 2006, 2009.
With best regards,
DmitryAuthor:
Passion Time: 2008-11-8 23:59
Yes. some friends reported this bug before, but hard to fix. We're do some researching on it.Author:
dandcnpack Time: 2008-11-10 15:56
I uncommented two commented rows in Source \SrcEditorEnhance \CnSrcEditorCodeWrap.pas
and ShortCuts start work. Is that right?
procedure TCnSrcEditorCodeWrapTool.InitMenuItems(AMenu: TMenuItem);
var
i_: Integer;
begin
WizShortCutMgr.BeginUpdate;
try
FMenu := AMenu;
Clear;
for i_ := 0 to Items.Count - 1 do
begin
AddMenuItem(AMenu, Items[i_].Caption, OnMenuItemClick, nil, Items[i_].ShortCut, '', i_);
// --comment in China-- 2007.12.13 by LiuXiao
//if (Items[i_].Caption <> '-') and (Items[i_].ShortCut <> 0) then
//fShortCuts.Add(WizShortCutMgr.Add('', Items[i_].ShortCut, OnShortCut, '', i));
end;
[ Last edited by dandcnpack at 2008-11-10 16:04 ]Author:
Passion Time: 2008-11-11 19:09
Oh, the commented 2 lines are related to another old bug: Random Access Violation after use hotkey to Popup menu. Now we still don't find a way to avoid the bug without modifying here.
But due to the AV bug won't occur every time, we can add the 2 lines to next nightly build version and make the shortcut work. And we'll keep researching to find the way for both OK.Author:
Passion Time: 2008-11-11 22:15
The 460 nightly build of CnWizards put the 2 lines back.
Please try it? http://www.cnpack.org/downbuilds.phpAuthor:
dandcnpack Time: 2008-11-13 10:43