CnPack Forum


 
Subject: ShortCut problem
dandcnpack
新警察
Rank: 1



UID 41183
Digest Posts 0
Credits 8
Posts 3
点点分 8
Reading Access 10
Registered 2008-11-1
Status Offline
Post at 2008-11-1 14:13  Profile | Blog | P.M. 
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,
Dmitry
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-11-8 23:59  Profile | Blog | P.M. 
Yes. some friends reported this bug before, but hard to fix. We're do some researching on it.
Top
dandcnpack
新警察
Rank: 1



UID 41183
Digest Posts 0
Credits 8
Posts 3
点点分 8
Reading Access 10
Registered 2008-11-1
Status Offline
Post at 2008-11-10 15:56  Profile | Blog | P.M. 
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;

        AddSepMenuItem(AMenu);
        AddMenuItem(AMenu, SCnWizConfigCaption, OnConfig);
    finally
      WizShortCutMgr.EndUpdate;
    end;
end;

[ Last edited by  dandcnpack at 2008-11-10 16:04 ]
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-11-11 19:09  Profile | Blog | P.M. 
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.
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-11-11 22:15  Profile | Blog | P.M. 
The 460 nightly build of CnWizards put the 2 lines back.
Please try it? http://www.cnpack.org/downbuilds.php
Top
dandcnpack
新警察
Rank: 1



UID 41183
Digest Posts 0
Credits 8
Posts 3
点点分 8
Reading Access 10
Registered 2008-11-1
Status Offline
Post at 2008-11-13 10:43  Profile | Blog | P.M. 
Thanks.
Top
 




All times are GMT++8, the time now is 2024-11-23 22:54

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.010538 second(s), 9 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP