Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Project Management/Project Manager    [ Add a report in this area ]  
Report #:  72574   Status: Closed
$R directive inside Package source file causes mess in project manager window
Project:  Delphi Build #:  12.0.3210.17555
Version:    12.1 Submitted By:   Issam Ali
Report Type:  Minor failure / Design problem Date Reported:  3/30/2009 2:16:24 AM
Severity:    Serious / Highly visible problem Last Updated: 8/27/2009 5:14:39 PM
Platform:    All platforms Internal Tracking #:   268760
Resolution: Fixed (Resolution Comments) Resolved in Build: : 14.0.3513.24210
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
You will notice this bug in Delphi2006, Delphi2007 and Delphi2009, when using $R directive inside the source file of the Package Projects, just after the line {$R *.res}, like this {$R ShowMeBug.res}, then when you reopen the project you will notice random parts of this new resource file name added to the Contains directory
like this:
S
Sh
Sho
Show
ShowM
ShowMe
ShowMeB
ShowMeBu
ShowMeBug
ShowMeBug.r
ShowMeBug.re
ShowMeBug.res
though the project still can be compiled!
Steps to Reproduce:
- begin new package project and save it.
- create new resource file like (ShowMeBug.res) for example, and save it in the project directory.
- from the project menu select "View Source".
- in the package source file and after the line {$R *.res} enter a new line and type this line {$R ShowMeBug.res} letter by letter and don't use copy/paste.
- save the project.
- close the project.
- reopen the project.
- open the "Project Manager" window, expand the "contains" directory, you will see random parts of the resource file name added  to the "contains" like this:
S
Sh
Sho
Show
ShowM
ShowMe
ShowMeB
ShowMeBu
ShowMeBug
ShowMeBug.r
ShowMeBug.re
ShowMeBug.res
Workarounds
- copy the resource file name and paste it directly after $R doesn't raise this bug!
- using $Resource instead of $R doesn't raise this bug!
- adding the {$R ShowMeBug.res} line after all directives doesn't raise this bug!

you can find full Description and workaround in this post:
http://blog.issamsoft.com/index.php?q=en/node/40
Attachment
72574.zip
Comments

Tomohiro Takahashi at 3/30/2009 7:10:54 AM -
> - open the "Project Manager" window, expand the "contains" directory,
> you will see random parts of the resource file name added  to the "contains" like this:
If possible, could you please attach some screenshots to confirm your issue?

Issam Ali at 3/30/2009 10:18:57 PM -
Done.

Lucian Radulescu at 3/31/2009 9:11:41 AM -
There are many reports on this stuff. The problem is as old as Delphi is, actually. You should probably *not* manually edit the .dpr/.dpk files, it is my feeling manually editing dpr/dpk will never get fixed.

Issam Ali at 4/1/2009 1:31:27 AM -
I agree with you, it's real pain!, and for that i said: adding a warning message in the beginning of the source file -or in the documentation- will be a good idea tell all that get fixed.

Server Response from: ETNACODE01