Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Code Explorer    [ Add a report in this area ]  
Report #:  43789   Status: Reported
Find declaration
Project:  Delphi Build #:  11.0.2627.5503
Version:    11.0 Submitted By:   Ingvar Narvestad
Report Type:  Minor failure / Design problem Date Reported:  4/4/2007 2:16:41 AM
Severity:    Infrequently encountered problem Last Updated: 4/19/2007 7:16:37 AM
Platform:    All versions Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (2 Total Ratings)
3.00 out of 5
Total Votes: 1
Description
I just discovered a strange bug with the "Find declaration"-feature on the popupmenu.

I have a forms application with a TTreeView as well as two related procedures: Mousedown and CustomDrawItem.

Just before the error occured I made a call to the CustomDrawItem-procedure from an other procedure with parameters TreeView1.CustomDrawItem(TreeView1, TreeView1.Selected, [], true);

When I right click the CustomDrawItem procedure in the type section and select "Find declaration" I am sent to characterposition 4096 on the line where the MouseDown procedure is declared and not the CustomDrawItem-procedure.
13 lines down, starting on characterspace 4097 i see " ltDraw: Boolean); " which is a fragment of the CustomDrawItem procedure declaration:
procedure TreeView1CustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);

This error does also occur when I right click the MouseDown procedure and select "Find Declaration". But then at least I still end up in the MouseDown procedure all though on the 4096th characterposition.

The error has occured several times in a row now. I have however not tried to restart delphi yet.
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments

Ingvar Narvestad at 4/4/2007 2:24:13 AM -

I seems the problem applied to all procedures, not only those related to the TreeView. Selecting "Find declaration" on any procedure sent me to characterposition 4096 in the TreeView1.MouseDown declaration.
Keyboard hotkeys are still working as normal.

I have now tried to restart delphi. The problem has changed a bit, however not to the better. When I select "Find declaration" on any procedure in the type section nothing happens at all.

Joe White at 4/12/2007 7:36:20 PM -
I've seen this behavior in Delphi 2006 as well, though I haven't found a reliable repro case.

Closing all editor files, and then reopening the files you need, seems to fix it in D2006.

Server Response from: ETNACODE01