[SOLVED] Suddenly IDE does not show hints lazarus / 9-Editor ---------------------------------------------------------------------- egsuh · 2024-08-15 04:29 For example, whey I type          memo1. then methods/properties that I can use should be shown, but not. currently              template    ....              template    .... are displayed. Is this related with anything of options/project options? ---------------------------------------------------------------------- Eugene Loza · 2024-08-15 07:16 In my experience this happens when the code fails to compile (due to some error in the code or due to some FPC internal error). Try Run -> Clean up and Build. If that doesn't help try restarting Lazarus (also worked for me a couple of times). ---------------------------------------------------------------------- WooBean · 2024-08-15 07:21 I thought you were  joking, but it is a real trunk issue. Try Project/New Project ... Select project type "Application". Write "Form1." and you will see: ---------------------------------------------------------------------- Eugene Loza · 2024-08-15 07:25 Quote from: WooBean on August 15, 2024, 09:21:05 amWrite "Form1." and you will see: And in messages it says: unit1.pas(25,1) Error: expected end., but Form1 found. This happens because the code fails to compile and therefore no meaningful autocompletion can be provided for this case. Fix the code (e.g. put call to Form1 in some procedure) and it'll work fine. ---------------------------------------------------------------------- WooBean · 2024-08-15 07:31 Am I not allowed to write "Form1."? No joking, please. ---------------------------------------------------------------------- dseligo · 2024-08-15 07:43 Quote from: WooBean on August 15, 2024, 09:31:43 amAm I not allowed to write "Form1."? No joking, please. You are allowed, but in your example isn't compileable code (just as Eugene Loza suggested). Try to write your example like this and see the difference: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure Test;begin  Form1.end; ---------------------------------------------------------------------- n7800 · 2024-08-15 10:12 The implementation section, like the interface section, is global. You can only create subsections with global type/const/var in it, as well as list procedures/methods. That is, instead of this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; interface implementation // anycode - ERROR end.  you just wanted to write this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; interface implementation   procedure test;  begin    // any code - OK  end; end.  to call test procedure from somewhere. But if you want to write code in the unit itself, there is also an initialization section: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; interface implementation initialization  // any code - OKend.  In general, do not confuse it with a "program" that does not have these sections. But it also specifies the code after the "global" begin (similar to initialization): Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program Project1;   procedure test;  begin    // any code - OK  end; begin  // any code - OKend.  But the author of the topic did not specify the full code of his program, so we can only guess that he has the same problem. ---------------------------------------------------------------------- egsuh · 2024-08-16 05:44 My program compiled and ran without any errors. I was talking about the "HINT" box which pops up when I type in ".". Now it simply works... but I don't know why it didn't work. Thank you for your advices. ---------------------------------------------------------------------- Eugene Loza · 2024-08-16 09:17 Quote from: egsuh on August 16, 2024, 07:44:27 ambut I don't know why it didn't work.It seems to happen when there was some compilation error "in the past", but sometimes (rarely but happens)  CodeTools thinks that this error is still present and stays in "erroneous state". As I've mentioned above - trying to compile (especially "clean up and build" option which can also get rid of a lot of "internal errors") or restarting Lazarus often helps. Hmmm... now that you mention it, I need to try to pay more attention to when exactly this bug happens and maybe find reproduction steps to make a bugreport. ---------------------------------------------------------------------- Zvoni · 2024-08-16 09:33 Most common reason (at least for me): I missed a closing ";" somewhere. Otherwise, everything Eugene, dseligo and n7800 said