Forum > Editor

IDE borked after onclick edit

(1/1)

lazer:
Hi,

I have a project with one main form and another unit.

I needed to change the onclick method of an object on the main form. I clicked on the onclick entry in the property editor and this highlighted the currently define responce method ( which was the onclick of a menu item , I wanted to separate this ).

I pressed Backspace key expecting to delete what was there. ( The correct thing would be select none, but you'd think when something is selected the delete key may do something ).  When this did not have the expected result, I think that I clicked Backspace a second time.

I don't know where these keystroked were sent but now the IDE is borked.

It seems the second one was sent to source code window and removed the n in unit of the first line. As well as I recall I pressed F9 and the error picked up. I realised there was an edit problem and corrected "unit".

The code still builds and runs as it is BUT...

If I click on the property editor to create the new onclick even , I see the drop down list is empty !  There are about 2 dozen events in this file for this form .

I doubleclick to create a new method and it fails and refers me to the message window.

It tells me it can't find ExtCtrls !  That's BS since the program still builds from run build  and still runs from F9.
On the console I see the same error msg plus a similar one about LResources.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---ApplyFPCSrcFiles /svn/FPCSource/ FileCount=17882ApplyFPCSrcFiles SrcCache.Update ...ApplyFPCSrcFiles BuildBoss.RescanCompilerDefines ...### TCodeToolManager.HandleException: [20170421200312] "unit not found: LResources" at Line=13 Col=3 in "~/laz/hill_main.pas"### TCodeToolManager.HandleException: [20170421200056] "unit not found: ExtCtrls" Col=3 in "~/laz/hill_main.pas" 
More troubling is that I cannot select any other form object in the IDE.  The selection frame with the dots remains on the Panel object in question.

If I doubleclick on other objects, it jumps to their onclick. I can select other object in the property editor but the IDE highlight remains on the broken panel in form view window. 

I've tried restarting Lazarus and it comes back in the same state.

This has screwed the project . Not good.

I have no idea where that key stroke was sent but it seems to have destroyed some internal object of that Tpanel and rendered it uneditable.

Not good.


Lazarus 2.3.0 (rev main-2_3-2165-gc63984efd6) FPC 3.3.1 x86_64-linux-gtk2

WooBean:
Hi,
have you installed your own (or other untested) package recently? Some symptomps you described may point that IDE is not stable. Anyway, if so - uninstall that package or reinstall  Lazarus.
IDE should be ready to prepare "Hello world" application in GUI version before a serious ussage.

 

Martin_fr:
No idea....

But anyway a few generic tips.

1)
Check for ppu (and o) files in your project dir.
The only ones you should have are for your own units. (e.g. hill_main.ppu and hill_main.o)

2)
Menu: Tools > Options
Page: Environment > Files
Check that the "Lazarus directory" point to your installation dir (especially if that changed at some point)

Open the package LCL.
Menu: Packages > Open Package File (lpk)
Then navigate to your installation folder, and open it.

3)
For the files ExtCtrls.pas ExtCtrls.ppu ExtCtrls.o, make sure there is
- Only/Exactly one of each in your Lazarus install directory
- Maximum one (but maybe none) in your /home/username/.lazarus

About (2)
The IDE caches (in its config folder:  ~/.lazarus ) the location of lpk files. If you installed a new Lazarus to a new folder, then that may have the old path (normally it will update, but...)

lazer:
Thanks Martin but the errors are entirely spurious since I can : Run |build  and Run|run

It is the IDE with its knickers in a twist.

This was directly after I backspaced with the onclick method selected in property editor.

I did finally clear the problem though not exactly how ( much flipping to other projects which also had the same problem initially. ).

I just reported this so that it is known.

Navigation

[0] Message Index

Go to full version