

Marsil
Members-
Content Count
33 -
Joined
-
Last visited
Everything posted by Marsil
-
@dummzeuch You tool works fine. Thanks again. But It's not like the F1 key, It doesn't jump directly to context help for the phrase under the cursor. It does a keyword search which is something different, Sadly the Embarcadero search engine results are poor, so I set it to use Google which is much better in finding results. I have a virtual keyboard software installed, I used it to remap SHIFT+F1 to F1 so that when I press F1 the Delphi Help Expert will kick into action instead of the built in F1 handler. This solution although not perfect but its better than getting my eyes burned every now and then! I hope Embarcadero will add a feature to use the online help docwiki as the default help for F1, at least if help documentation is not installed. Also I had to add this to u_dzWelcomePageHandler make it work with 10.4 CE {$IFDEF VER340} // Delphi/RAD Studio 10.4 Sydney MajorVersionNumberChar = '27'; {$ENDIF VER330}
-
@dummzeuch thanks!! I will give it a try and see 🙂 @Uwe Raabe Thanks!!, I didn't expect to find installer/uninstaller there, I just launched the uninstaller from Control Panel , IMHO, It should be there too not just the uninstall program.
-
IDE - Delphi 11.1 "View Unit" and "View Form" buttons stopped working.
Marsil replied to Louis Kriel's topic in Delphi IDE and APIs
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 -
Delphi 11 - Customize Toolbar works very badly
Marsil replied to Reinier Sterkenburg's topic in Delphi IDE and APIs
I tried that, doesn't work for me!, D11.1 -
This code will not compile: procedure TfrmMain.ListBox1Click(Sender: TObject); begin if ListBox1.ItemIndex < 0 then Exit; var TestMethod : TMethod; TestMethod.Data := Self; TestMethod.Code := ListBox1.Items.Objects[ListBox1.ItemIndex]; var TestProc : TTestProc; TestProc := TTestProc (TestMethod); TestProc; // --> Compiler error: [dcc32 Error] UfrmMain.pas(422): E2014 Statement expected, but expression of type 'TTestProc' found end; But when moving the inline var TestProc to the var section the code compiles! procedure TfrmMain.ListBox1Click(Sender: TObject); var TestProc : TTestProc; begin if ListBox1.ItemIndex < 0 then Exit; var TestMethod : TMethod; TestMethod.Data := Self; TestMethod.Code := ListBox1.Items.Objects[ListBox1.ItemIndex]; TestProc := TTestProc (TestMethod); TestProc; end; and TTestProc is defined as: TTestProc = procedure of object; I'm not sure if this is a compiler bug or its by design or I am missing on something!
-
We wouldn't discover this potential bug with those parentheses lol 😀 As long as parentheses are optional everyone should be happy. Also this bug wouldn't reveal itself if I used the brief and favorable way: var TestMethod : TMethod; TestMethod.Data := Self; TestMethod.Code := ListBox1.Items.Objects[ListBox1.ItemIndex]; TTestProc (TestMethod); But when testing I like to go in details, It helps to better understand the code and catch any potential bugs.
-
Yeah it does! Being a sole Delphi programmer I've never used to use empty brackets like some other languages. Never thought about it. But, the question remains: Why inline var declaration not compiling as standard var declaration unless brackets used?
-
There are two overloaded versions of SearchBuf in System.StrUtils: {$IFNDEF NEXTGEN} function SearchBuf(Buf: PAnsiChar; BufLen: Integer; SelStart, SelLength: Integer; SearchString: AnsiString; Options: TStringSearchOptions = [soDown]): PAnsiChar; overload; deprecated 'Moved to the AnsiStrings unit'; {$ENDIF} {$IFDEF UNICODE} function SearchBuf(Buf: PChar; BufLen: Integer; SelStart, SelLength: Integer; SearchString: String; Options: TStringSearchOptions = [soDown]): PChar; overload; {$ENDIF} you can see that the deprecated one is the ANSI version., actually the deprecated keyword is to alert you that the function is moved (rather than taken off). The Unicode version is still there, I think it is more suitable than the ANSI version when working with strings in general. Remove any reference to the AnsiStrings from your uses section , Keep only StrUtils, and replace AnsiString type with the string type, PAnsiChar with the PChar so that the compiler will use the Unicode overload instead of the deprecated ANSI overload.