2008-11-1 14:13
dandcnpack
ShortCut problem
Hello.
Assigned ShortCut to any tool from [b]?Source Block Tools?[/b] does not work.
Unassigning ShortCut (for example [color=DarkGreen]try..finally..end[/color] [Alt Shift E]) also does not work — ShortCut remains working.
I checked it on just installed Delphi 2006, 2009.
With best regards,
Dmitry
2008-11-8 23:59
Passion
:L Yes. some friends reported this bug before, but hard to fix. We're do some researching on it.
2008-11-10 15:56
dandcnpack
I uncommented two commented rows in [color=Blue]Source \SrcEditorEnhance \CnSrcEditorCodeWrap.pas[/color]
and ShortCuts start work. Is that right?
[b]procedure [/b]TCnSrcEditorCodeWrapTool.InitMenuItems(AMenu: TMenuItem);
var
i_: Integer;
[b]begin[/b]
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_);
[color=Green]// --comment in China-- 2007.12.13 by LiuXiao
//if (Items[i_].Caption <> '-') and (Items[i_].ShortCut <> 0) then[/color][color=Green][/color]
[color=Green]//fShortCuts.Add(WizShortCutMgr.Add('', Items[i_].ShortCut, OnShortCut, '', i));[/color]
end;
AddSepMenuItem(AMenu);
AddMenuItem(AMenu, SCnWizConfigCaption, OnConfig);
finally
WizShortCutMgr.EndUpdate;
end;
[b]end[/b];
[[i] Last edited by dandcnpack at 2008-11-10 16:04 [/i]]
2008-11-11 19:09
Passion
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.:lol
2008-11-11 22:15
Passion
The 460 nightly build of CnWizards put the 2 lines back.
Please try it? [url]http://www.cnpack.org/downbuilds.php[/url]
2008-11-13 10:43
dandcnpack
Thanks.
页:
[1]
Powered by Discuz! Archiver 5.0.0
© 2001-2006 Comsenz Inc.