Jump to content
Louis Kriel

IDE - Delphi 11.1 "View Unit" and "View Form" buttons stopped working.

Recommended Posts

My Delphi - Rad studio 11.1 IDE suddenly have a problem. The "View Unit" and "View Form" 
buttons suddenly stopped showing anything. I uninstalled a few 3r party "Experts" but that 
didn’t help. It happens on any type of project, VCL or FMX. 
Any ideas where I can start to look for the solution?

Share this post


Link to post

Strange. What happens when you press F12 (standard key to switch between form and unit)?

Share this post


Link to post

No need to reset the toolbar, just remove the two buttons and add them again!

Anyway the toolbar is buggy and really need fixing.

 

keyboard shortcuts:

CTRL+F12  View Units

SHIFT+F12 View Forms

 

Also select main menu:

View>View Units

View>View Forms

 

Share this post


Link to post

Happened to me this morning for the first time.  Close/open the IDE resolved.

Share this post


Link to post

I've had the same problem for months. Close and re-open, even restart Windows, doesn't fix them. Remove and re-add from customize toolbars doesn't fix them either. Ctrl+F12 does work, but I prefer to use the buttons. What else can I try?

 

I also have several other issues with the Delphi 11.2 IDE. For example, in one of my longer units it seems always confused what lines things are on. If I search the file and click to go to a result it always goes to the wrong place (offset by a constant amount). Find Declaration (Ctrl+click) also never works in that file. Is this a bug with long units (almost 8000 lines) or does something need resetting? Again, restart doesn't help.

Share this post


Link to post
10 minutes ago, XylemFlow said:

Is this a bug with long units (almost 8000 lines) or does something need resetting? Again, restart doesn't help.

It is usually due to non-Windows linebreaks in the file (only #10 or only #13 instead of #13#10 pair).

Share this post


Link to post
On 6/25/2023 at 2:30 PM, PeterBelow said:

It is usually due to non-Windows linebreaks in the file (only #10 or only #13 instead of #13#10 pair).

Thanks. I tried searching the file in Notepad++ using Regular expression \r(?!\n)|(?<!\r)\n, which is supposed to find these. None were found though.

Share this post


Link to post
52 minutes ago, XylemFlow said:

Thanks. I tried searching the file in Notepad++ using Regular expression \r(?!\n)|(?<!\r)\n, which is supposed to find these. None were found though.

You could simply use Notepad++ to change the line break to Unix and back to Windows. That fixes any of these problems.

 

Also Delphi 11 comes with a setting to do that automatically:

Tools -> Options -> User Interface -> Editor -> Line Endings:

"Convert files with known extensions to CRLF"

(No idea when that was introduced. I had not noticed before. Also no idea whether it actually works.)

Share this post


Link to post

I think from D11. It's alerted me a couple of times to a fix.

Share this post


Link to post
4 hours ago, dummzeuch said:

You could simply use Notepad++ to change the line break to Unix and back to Windows.

another way, you can try this:

  1. copy your problematic text in a any new unit (.PAS) --> you can create using your Notepad/Notepad++/ etc...  or saving your "pasted text" in your current unit in the Editor
  2. now, try open this file in your IDE
    1. normally, the RAD identify that exists some line-feeds non-default (like used in Unix files) and try solve it!

image.thumb.png.3acc694e487e0ca95e03d37a9389eafe.png

Share this post


Link to post

Thanks everyone, but I don't think the line endings are the cause of the issue. Like I said, Notepad++ couldn't find any incorrect line endings. I also tried converting to Unix EOL and back to Windows EOL and the resulting file was identical to the original.

Share this post


Link to post

11.3 exhibits the same problem.  I went ahead and uninstalled/reinstalled 11.3.  Works fine, for now.

 

Also interesting that sometimes after a long coding session with a lot of this and that its modal boxes will appear behind the IDE.  Quirky crazy things.

Edited by TazKy

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×