Since yesterday, all blue dots (compiled lines) in my source code are shifted with one line up.
So, the first dot starts at 'var' instead of 'begin' and the last dot is one line before the last 'end' of a function.
I deleted all files (starting with DCUs) except DPR, PAS, DFM and DPRJ and recompiled. But the dots are still shifted.
How can I fix this? It makes the step=by-step debugging almost impossible.
It could be that the file is corrupted so that you don't have proper line end combination (#13#10) on one line. Is the "one line up error" throughout the file or does it start somewhere in the middle of the unit?
Beginning with Delphi 2007 (maybe already Delphi 2005) you can check the line ends in your code by enableing checkbox Show line breaks in Tools - Options - Editor options - Source options. The line breaks look like this:
As you can see, a CR on its own is not considered a line break and messes up the synchronization of the executable line dots
Try closing Delphi then deleting all *.identcache files.
I have a batch file at the root of my Delphi projects directory that recursively deletes all identcache files.
Try This:
Open the unit in an editor with capabilities to change codification, like Notepad++.
Code/save the file as ANSI.
Open or recharge the file in the Delphi IDE.
The dots must be in the right place.
Related
I'm using HexaPDF to read a file with an AcroForm and fill in this form's fields using the following code:
#acro_form.field_by_name(fieldname).field_value = value
Up until version 0.20.1 this worked fine. As of version 0.20.2, I get this error: HexaPDF::Error (Glyph for "2" missing) on trying to generate the document. The glyphs for all numbers, and for all lower case letters except a, b, and c cause this respective error.
This problem only occurs in my dev setup on Windows 11, not on Linux.
#gettalong or anyone else who might be able to help: Thx in advance!
With the help of #gettalong I figured out the problem:
Some of the text in data/hexapdf/encoding/glyphlist.txt appears to be automatically processed by Windows, inserting line and page breaks in this file which should not be there, and causing other changes to the file's encodings.
I resolved it by editing the above file as follows:
Remove extra paragraph and line breaks and potential invisible characters on entries for controlFF, controlVT and controlSO
Set codes (the part after the semicolon) for controlSUB to blank
Remove blank space on "controlBEL; ", changing this line to "controlBEL;"
Ensure there is a blank space on space, i.e. the line must be "space; ", not "space;" and ensure there is no additional invisible character there.
Save the file and restart server.
Since yesterday, all blue dots (compiled lines) in my source code are shifted with one line up.
So, the first dot starts at 'var' instead of 'begin' and the last dot is one line before the last 'end' of a function.
I deleted all files (starting with DCUs) except DPR, PAS, DFM and DPRJ and recompiled. But the dots are still shifted.
How can I fix this? It makes the step=by-step debugging almost impossible.
It could be that the file is corrupted so that you don't have proper line end combination (#13#10) on one line. Is the "one line up error" throughout the file or does it start somewhere in the middle of the unit?
Beginning with Delphi 2007 (maybe already Delphi 2005) you can check the line ends in your code by enableing checkbox Show line breaks in Tools - Options - Editor options - Source options. The line breaks look like this:
As you can see, a CR on its own is not considered a line break and messes up the synchronization of the executable line dots
Try closing Delphi then deleting all *.identcache files.
I have a batch file at the root of my Delphi projects directory that recursively deletes all identcache files.
Try This:
Open the unit in an editor with capabilities to change codification, like Notepad++.
Code/save the file as ANSI.
Open or recharge the file in the Delphi IDE.
The dots must be in the right place.
In C++ Builder 10.1 Berlin, where can I set the default width of the
IDE generated dash line (please see highlighted part in the picture below) when adding a new event handler for example?
I changed the default right gutter from 80 to 100/120 columns and it would be nice, if this line length would be consistent to that by default.
The separator you are referring to is not generated dynamically, so you can't simply configure its width. It is actually stored in a template file ($(BCB)\Bin\bcb.bcf) and gets copied as-is into the code. If the template does not exist, the dashed divider is used by default, and it has a fixed width..
So, you would have to edit that template file to create the effect you are looking for.
From Customizing C++Builder (which is written for older IDEs, but some of its information still applies):
File and Function Divider Line
If you don't like the standard line inserted at the top of each units cpp file or the function divider line that is used when an event handler or other function is added to your code by C++Builder then you can set your own. Using lines that stand out for you and which complement your other code comments can help to partition a unit in your head when browsing code.
Specifying a custom top line or function divider line involves editing the file $(BCB)\Bin\bcb.bcf, where $(BCB) is the folder in which C++Builder is installed. This is a text file in an INI format, so you can use Notepad, WordPad, or any other text editor. There will be no standard text editor associated with the .bcf file so you will need to select one when opening the file with Windows Explorer. Alternatively you can start your text editor and browse to the file.
To specify a custom top line in new unit cpp files add a definition for Divider Line Break within a new section named Code Formatting. To specify a custom function divider line add a definition for Divider Line. Set these definitions to the text to be used in the source code. The text should be formatted as a comment so as not to cause syntax errors in your code. The following example demonstrates these customizations.
[Code Formatting]
Divider Line Break=/* ===================== TOP LINE ===================== */
Divider Line=/* ===================== END FUNCION ===================== */
If the file does not already exist, simply create it. You will need to run your text editor with administrative rights to save the file if C++Builder is installed under C:\Program Files or C:\Program Files (x86) (which it is by default).
I'm having a bug on Delphi XE2 (Update 4 Hotfix 1), which reproduces many times on the legacy project I work (it evolved from D6 to D7,D2006 and finally XE2), but I didn't know how to trigger it in a smaller project.
The latest time, it triggered on creating an event handler for a "hidden popup" on the app. When I click on the menu option to create the Click handler this happens.
pprocedure TMainForm.Blablabla1Click(Sender: TObject);
begin
end;
rocedure TMainForm.FormActivate(Sender: TObject);
You can see that the IDE inserted the new code INSIDE the declaration of the next method... But it's not all.
Almost all times, on the DPR, code gets mangled too:
AApplication.CreateForm(TDM_DataAcc, DM_DataAcc);
AApplication.CreateForm(TMainForm, MainForm);
pplication.CreateForm(Tfrm_login, frm_login);
f frm_Login.CanLogin = mrOK then Application.Run
(It's almost like that, I don't remember if the 3rd Application.CreateForm get its' 'A' clipped or not, the other I'm sure are doubled and the IF gets its' "I" clipped).
Chasing on QualityCentral doesn't help (found nothing). This also happens sometimes on Class Completion(Ctrl-SHift-C).
Someone knows what triggers that bug, so I can create an new application and send it to Embarcadero?
Behavior like that suggests that the IDE is miscounting characters in the file. There are several "file oddities" that the developers might not have anticipated and that could cause a character index to be miscalculated.
Check your file for unusual line endings. For example, a line missing a carriage return will appear correctly in the editor, but can cause incorrect line numbers elsewhere in the program.
Non-breaking spaces are another kind of character that will appear normally, and maybe even parse correctly, but occupies multiple bytes when represented in UTF-8 when the "normal" version of the character (a regular space) only takes up one. You will sometimes acquire such characters if you copy code from a Web browser.
Incorrect byte-order marks for UTF-8 or UTF-16 source files might also cause problems.
Often, opening your source file in Notepad or a hex editor will help you identify these problems.
When I generate a .pdf file from a .tex file using pdflatex, only the "Contents" title is shown with no actual TOC. If I run pdflatex my.tex once more, it generates the TOC just fine. I can reproduce this simply by removing the .toc file. What I think is happening is that my .toc file is being generated too late -- so how can I make the TOC work first time? Should I be generating the TOC beforehand without using pdflatex?
This is normal. LaTeX document need several compilations to reach a stable state. Use rubber -d my to compile the right number of times (rubber comes as a package on many linux distros).
I might be mistaken, but I think, that this is the default behaviour. I assume, you also won't find correct cross references (footnotes, end notes, literature) after the first run of pdflatex.
The point is, that LaTeX needs the extra rounds to resolve the references pointing inside the document, to get numbering and page numbers right.
I experienced the same problem with the editor Latexian. What solved the problem was changing the preferences. I changed "Number of typesetter runs at end" to 3, instead of the default 1. Then I added the "Refresh" button to the toolbar and tried refreshing and it worked.