CnPack Forum


 
Subject: 代码编辑器块浮动按钮的一个BUG
shenloqi
灌水处处长
Rank: 4



UID 34
Digest Posts 1
Credits 287
Posts 179
点点分 287
Reading Access 10
Registered 2003-3-15
Status Offline
Post at 2008-1-23 11:14  Profile | P.M. 
代码编辑器块浮动按钮的一个BUG

[已更新,找到一个重现步骤,应该确定跟CnPack有关。这是一个存在已久的BUG了但是我不确定是不是CnPack的BUG,或许也可能是BDS自己的问题,而且不能百分百的重现。
截图见附件,我简单描述一下步骤。

我的环境:CnPack为08年1月5日的Build(不限此版本,这个问题很多版本一直都存在),BDS2007,Windows2003 SP1英文版,默认Locale为中文。
打开一个工程,打开多个源代码文件,浏览其中一个源代码文件,选中一段文字(此时,CnPack的代码悬浮工具按钮会出现),双击编辑器的Tab页(将会关闭当前源代码文件),有一定几率出现附图的BUG。]

重现方法和步骤:
新建一个工程,打开Forms.pas和Classes.pas,选择Classes.pas中的一段源代码,出现浮动工具按钮,保持选择文字不变,切换到Forms.pas再切换为Classes.pas,此时会发现尽管Classes.pas已经有选择文字,但是浮动按钮已经消失,此时重新在Classes.pas选择文字,将会重新出现该浮动按钮,此时鼠标单击Classes.pas标签将会出现所报告的异常。


附:出错时BDS自带的堆栈信息
---------------------------
Error
---------------------------
Cannot focus a disabled or invisible window.
---------------------------
OK   Details <<   
---------------------------
[2015C02E]{vcl100.bpl  } Forms.TCustomForm.SetActiveControl (Line 4586, "Forms.pas" + 6) + $1C
[2015C0F1]{vcl100.bpl  } Forms.TCustomForm.FocusControl (Line 4617, "Forms.pas" + 2) + $2
[20143276]{vcl100.bpl  } Controls.TWinControl.SetFocus (Line 8877, "Controls.pas" + 3) + $2
[20A1ED86]{coreide100.bpl} EditorForm.TEditWindow.TabControlMouseDown (Line 2656, "EditorForm.pas" + 19) + $4
[2013CA7F]{vcl100.bpl  } Controls.TControl.MouseDown (Line 5240, "Controls.pas" + 1) + $23
[20E9D952]{vclide100.bpl} GDIPlus.GradientTabs.TGradientTabSet.MouseDown (Line 846, "gdiplus.gradienttabs.pas" + 1) + $D
[2013CB02]{vcl100.bpl  } Controls.TControl.DoMouseDown (Line 5252, "Controls.pas" + 7) + $20
[2013AF8F]{vcl100.bpl  } Controls.TControl.SetMouseCapture (Line 4382, "Controls.pas" + 2) + $6
[2013CB50]{vcl100.bpl  } Controls.TControl.WMLButtonDown (Line 5261, "Controls.pas" + 5) + $E
[2013C527]{vcl100.bpl  } Controls.TControl.WndProc (Line 5146, "Controls.pas" + 83) + $6
[20140158]{vcl100.bpl  } Controls.TWinControl.IsControlMouseMsg (Line 7176, "Controls.pas" + 9) + $25
[201406A7]{vcl100.bpl  } Controls.TWinControl.WndProc (Line 7304, "Controls.pas" + 111) + $6
[2013FDD0]{vcl100.bpl  } Controls.TWinControl.MainWndProc (Line 7073, "Controls.pas" + 3) + $6
[20040E4C]{rtl100.bpl  } Classes.StdWndProc (Line 11583, "common\Classes.pas" + 8) + $0
[20163691]{vcl100.bpl  } Forms.TApplication.StopHintTimer (Line 8673, "Forms.pas" + 3) + $6
[201625F0]{vcl100.bpl  } Forms.TApplication.ProcessMessage (Line 8105, "Forms.pas" + 23) + $1
[2016262A]{vcl100.bpl  } Forms.TApplication.HandleMessage (Line 8124, "Forms.pas" + 1) + $4
[2016291F]{vcl100.bpl  } Forms.TApplication.Run (Line 8223, "Forms.pas" + 20) + $3
[0042297A]{bds.exe     } bds.bds (Line 195, "" + 7) + $7


CnWizards收集到的环境信息:

设置:
  OS: Windows 5.2 (Build 3790: Service Pack 1)
  CnWizards: CnWizards_D11.dll Ver: 0.8.2.360_Unstable Build 2008.01.05
  IDE: ideD1100
  ComCtl32: 5.82.3790.1830
已安装的专家:
  C:\Program Files\CnPack\CnWizards\CnWizards_D11.dll = CnWizards_D11
  C:\Program Files\GExperts for Delphi 2007\GExpertsDelphi2007.dll = GExpertsDelphi2007
  C:\Documents and Settings\Administrator\Application Data\DelphiSpeedUp\DelphiSpeedUp105.dll = DelphiSpeedUp
已安装的包:
  __(Untitled) = $(BDS)\bin\bcbie100.bpl
  __(Untitled) = $(BDS)\bin\dclbcbsmp100.bpl
  CodeGear Control Panel Applet Package = $(BDS)\bin\applet100.bpl
  Delphi 1.0 Compatibility Components = $(BDS)\bin\dcl31w100.bpl
  CodeGear ActionBar Components = $(BDS)\bin\dclact100.bpl
  CodeGear Database Components = $(BDS)\bin\dcldb100.bpl
  CodeGear Editor Emacs Enhancements = $(BDS)\bin\dclemacsedit100.bpl
  CodeGear Markup Language Wizards = $(BDS)\bin\dclmlwiz100.bpl
  CodeGear Editor Script Enhancements = $(BDS)\bin\dclsmpedit100.bpl
  CodeGear Standard Components = $(BDS)\Bin\dclstd100.bpl
  CodeGear DataSnap Connection Components = $(BDS)\bin\dclmcn100.bpl
  CodeGear MyBase DataAccess Components = $(BDS)\bin\dclmid100.bpl
  CodeGear ADO DB Components = $(BDS)\bin\dclado100.bpl
  CodeGear dbExpress Components = $(BDS)\bin\dcldbx4100.bpl
  CodeGear SimpleDataset Component (DBX) = $(BDS)\bin\dcldbxcds4100.bpl
  Indy 10 Core Design Time = $(BDS)\Bin\dclIndyCore100.bpl
  Indy 10 Protocols Design Time = $(BDS)\Bin\dclIndyProtocols100.bpl
  CodeGear Sample Components = $(BDS)\bin\dclsmp100.bpl
  CodeGear WebSnap Components = $(BDS)\bin\dclwebsnap100.bpl
  CodeGear Internet Components = $(BDS)\bin\dclnet100.bpl
  CodeGear SOAP Components = $(BDS)\bin\dclsoap100.bpl
  __(Untitled) = $(BDS)\bin\bcbofficexp100.bpl
已安装的 IDE 包:
  DelphiSpeedUp Loader = C:\Documents and Settings\Administrator\Application Data\DelphiSpeedUp\DelphiSpeedUpLoader105.bpl
  CodeGear Assembly Plug = $(BDS)\Bin\asmview100.bpl
  $(BDS)\Bin\codetemplates100.bpl = $(BDS)\Bin\codetemplates100.bpl
  CodeGear Professional Core IDE Package = $(BDS)\bin\coreproide100.bpl
  DBK Debugger IDE Package = $(BDS)\Bin\dbkdebugide100.bpl
  DBK Debugger Professional IDE Package = $(BDS)\bin\dbkdebugproide100.bpl
  CodeGear .NET Core IDE Package = $(BDS)\Bin\dotnetcoreide100.bpl
  CodeGear IDE Exception Diagnostics - with JEDI Code Library = $(BDS)\bin\exceptiondiag100.bpl
  $(BDS)\bin\fileexplorer100.bpl = $(BDS)\bin\fileexplorer100.bpl
  CodeGear Filter Examples = $(BDS)\bin\idefilefilters100.bpl
  CodeGear Pluggable Tree View = $(BDS)\bin\plugview100.bpl
  CodeGear MSBuild Targets File Add-In = $(BDS)\Bin\projecttargets100.bpl
  CodeGear Refactor IDE Package = $(BDS)\bin\refactoride100.bpl
  CodeGear IDE ToDo Manager = $(BDS)\bin\todoide100.bpl
  CodeGear Delphi for .NET IDE Core package = $(BDS)\Bin\delphidotnetcore100.bpl
  Data Explorer IDE Package = $(BDS)\Bin\DataExplorer100.bpl
  CodeGear HTML Designer IDE Package = $(BDS)\bin\htmide100.bpl
  CodeGear HTML Tidy Package = $(BDS)\bin\htmltidy100.bpl
  Markup Code Completion = $(BDS)\bin\mlcc100.bpl
  CodeGear HTML IDE Package = $(BDS)\bin\htmlide100.bpl
CnPack IDE 专家启用状态:
  1 = CnAlignSizeWizard
  0 = CnMessageBoxWizard
  1 = CnComponentSelector
  1 = CnTabOrderWizard
  1 = CnBookmarkWizard
  1 = CnSrcTemplate
  1 = CnEditorWizard
  0 = CnMsdnWizard
  1 = CnPas2HtmlWizard
  0 = CnReplaceWizard
  0 = CnSourceDiffWizard
  1 = CnStatWizard
  0 = CnPrefixWizard
  0 = CnCorPropWizard
  1 = CnProjectExtWizard
  0 = CnCommentCropperWizard
  0 = CnRepositoryMenuWizard
  0 = CnExplorerWizard
  0 = CnFilesSnapshotWizard
  1 = CnProcListWizard
  1 = CnUsesCleaner
  1 = CnIdeEnhanceMenuWizard
  0 = CnIdeBRWizard
  0 = CnScriptWizard
  0 = CnFastCodeWizard
  1 = CnFormEnhanceWizard
  1 = CnSrcEditorEnhance
  1 = CnPaletteEnhanceWizard
  1 = CnInputHelper
  0 = CnVerEnhanceWizard
  0 = CnIniFilerWizard
  0 = CnMemProfWizard
CnPack IDE 专家创建状态:
  1 = TCnFastCodeWizard
  1 = TCnFormEnhanceWizard
  1 = TCnAlignSizeWizard
  1 = TCnMessageBoxWizard
  1 = TCnComponentSelector
  1 = TCnTabOrderWizard
  1 = TCnBookmarkWizard
  1 = TCnSrcTemplate
  1 = TCnEditorWizard
  1 = TCnMsdnWizard
  1 = TCnPas2HtmlWizard
  1 = TCnReplaceWizard
  1 = TCnSourceDiffWizard
  1 = TCnStatWizard
  1 = TCnPrefixWizard
  1 = TCnSrcEditorEnhance
  1 = TCnPaletteEnhanceWizard
  1 = TCnCorPropWizard
  1 = TCnProjectExtWizard
  1 = TCnCommentCropperWizard
  1 = TCnRepositoryMenuWizard
  1 = TCnIniFilerWizard
  1 = TCnMemProfWizard
  1 = TCnExplorerWizard
  1 = TCnFilesSnapshotWizard
  1 = TCnInputHelper
  1 = TCnProcListWizard
  1 = TCnVerEnhanceWizard
  1 = TCnUsesCleaner
  1 = TCnIdeEnhanceMenuWizard
  1 = TCnIdeBRWizard
  1 = TCnScriptWizard
CPU:
  # Processors: 1
  Type: Intel 586 model 4 Stepping 8
  Speed: 2987.88 MHz
键盘:
  Type 0: IBM enhanced (101- or 102-key) keyboard with OEM FKeys
  Layout: US (us) in KBDUS.DLL
本地化信息:
  Number of Digits: '2'
  Leading Zero: '0'
  List Separators: ','
  Grouping: '3;0'
  Decimal Separator: '.'
  Group Separator: ','
  Monetary Grouping: '3;0'
  Monetary Decimal Separator: '.'
  Monetary Group Separator: ','

[ 本帖最后由 shenloqi 于 2008-1-23 11:36 编辑 ]


Image Attachment: [BDS截图] BUG.JPG (2008-1-23 11:14, 100.29 K)

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-1-23 19:47  Profile | Blog | P.M. 
感谢沈兄的详尽的报告。我们将尽快排查这个问题。
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-1-23 20:58  Profile | Blog | P.M. 
这个问题比较容易复现,而且还有个问题:选中块,出现浮动按钮后,切换到其他页面,则浮动按钮消失,以后再选中代码时浮动按钮虽然能出现,但貌似已经不能点击它出下拉菜单了,鼠标移动上去也没反应。
BDS2005/2006下均有此问题。
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-1-23 21:50  Profile | Blog | P.M. 
经过检查,发现BDS中有个额外的毛病,在切换页面时会将我们的浮动按钮的Enabled设置为False,导致了沈兄报告的问题。现在我在显示浮动按钮的代码中也额外加了一句Enabled := True;貌似解决了这个问题,烦请沈兄下362版或从最新的CVS上倒过代码来trytry?
Top
 




All times are GMT++8, the time now is 2024-11-27 08:07

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

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