CnPack Forum


 
Subject: Problem with keyboard
Dans
新警察
Rank: 1



UID 13191
Digest Posts 0
Credits 18
Posts 7
点点分 18
Reading Access 10
Registered 2007-5-7
Status Offline
Post at 2007-5-7 20:51  Profile | Blog | P.M. 
Problem with keyboard

Hi,

Thanks for great IDE tools. I use them very often. But there one thing that anoying me every day.

Problem is introduced only after installing CnWizards. After disabling expert all works fine again...

Environment:
  • Delphi 7
  • IDE Classic key mapping
  • Windows XP Proffesional SP2
  • CnPack IDE Wizards, ver 0.8.2.311_Unstable Build 2007.04.30
Steps:
  • Create New Application
  • Press Shift+F2 (Save All) Save dilaog appeared. Press cancel.
  • Result: keyboard in editor won't work.
As workaround i press Alt key and then Esc. This situation is always reproducible on different computers.
I think problem with some windows hook used in CnWizards.

TIA,
Dans
Top
shenloqi
灌水处处长
Rank: 4



UID 34
Digest Posts 1
Credits 287
Posts 179
点点分 287
Reading Access 10
Registered 2003-3-15
Status Offline
Post at 2007-5-9 09:49  Profile | P.M. 
Maybe it is caused by control's focus issue.
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 2007-5-9 21:36  Profile | Blog | P.M. 
May I ask when you press SHIFT+F2? In editor or Form Designer?

If Editor, it will call our Input Helper's hotkey to enable/disable auto-popup. Not save all.

If in Form it will call save all. and if we press cancel and click editor to edit source, all works fine in my workstation. No keys blocked.

I don't know how to reproduce the problem.
Did you install other wizards?
Top
Dans
新警察
Rank: 1



UID 13191
Digest Posts 0
Credits 18
Posts 7
点点分 18
Reading Access 10
Registered 2007-5-7
Status Offline
Post at 2007-5-9 23:07  Profile | Blog | P.M. 
Reply #2 shenloqi's post

Hi,

I pressed Shift+F2 in Editor. Sometimes keyboard won't work for other shortcuts, but before problem always present ModalDialog.
Yes, i have many experts
  • MMX
  • GExperts
  • VssConnexion
  • Castalia
  • DelphiSpeedup
I disabled all of them - this is first thing that i did during searching wich expert causes this situation.
Ok, i'll try to debug your sources and tell about results. Nice if you will have time to fix  

TIA,
Dans
Top
Dans
新警察
Rank: 1



UID 13191
Digest Posts 0
Credits 18
Posts 7
点点分 18
Reading Access 10
Registered 2007-5-7
Status Offline
Post at 2007-5-11 04:43  Profile | Blog | P.M. 
I found problem

Hi again

I found what causes problem:
Three hours of deep debugging... damn it.

unit: CnWizShortCut.pas


procedure TCnWizShortCutMgr.InstallKeyBinding;
...

  if not IsEmpty then
  begin
    QuerySvcs(BorlandIDEServices, IOTAKeyboardServices, KeySvcs);
    SaveMainMenuShortCuts;
    try
      try
        FKeyBindingIndex := KeySvcs.AddKeyboardBinding(TCnKeyBinding.Create(Self));
        KeySvcs.PushKeyboard(SCnPackKeyboard); // This method must be called only once per session

        if FPushed then // Add boolean field FPushed
        begin
          KeySvcs.PushKeyboard(SCnPackKeyboard);
          FPushed := True;
        end;
      except
        ;
      end;
    finally
      RestoreMainMenuShortCuts;
    end;
  end;
end;



Can you fix this?

Thanks,
Dans
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 2007-5-11 12:14  Profile | Blog | P.M. 
Good!
Much Thanks for your professional debugging skills! It fixed not only your problem, but also our another problem of keyboard not working after ALG+G dialog, which aannoy us for a long time.

You'll in our credits list.
Top
Dans
新警察
Rank: 1



UID 13191
Digest Posts 0
Credits 18
Posts 7
点点分 18
Reading Access 10
Registered 2007-5-7
Status Offline
Post at 2007-5-11 19:41  Profile | Blog | P.M. 
Reply #6 Passion's post

Hi,

Sorry for new bug

if not FPushed then

BTW, as i saw PushKeyboard is not used in GExperts and other experts. What is the meaning of using this function?
Pair function PopKeyboard does'nt resolves problem.

Best regards,
Dans
Top
Dans
新警察
Rank: 1



UID 13191
Digest Posts 0
Credits 18
Posts 7
点点分 18
Reading Access 10
Registered 2007-5-7
Status Offline
Post at 2007-5-11 20:09  Profile | Blog | P.M. 
Reply #6 Passion's post

ALG+G dialog...

Yes i it's causes the same problem. But i never give up
I tried everything, debug your hooks, ApplicationMessage, Trap Messages, test many supposition. But all without results.
Then i start commenting your DPR file (binary) and found unit that causes problem, then comment half of unit, debug, debug...

Best regards,
Dans
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 2007-5-12 00:13  Profile | Blog | P.M. 
Hard works, three hour deep debug.
Top
 




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

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

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