![](https://en.delphipraxis.net/uploads/set_resources_2/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://en.delphipraxis.net/uploads/monthly_2020_09/L_member_3433.png)
Lajos Juhász
-
Content Count
881 -
Joined
-
Last visited
-
Days Won
12
Posts posted by Lajos Juhász
-
-
2 minutes ago, Uwe Raabe said:How would you know that?
The oldest bug report is from July and it's not marked as duplicated if it was a known issue they would flag it.
-
Unfortunately this is a well known bug in Delphi 10.4 - there was a bug report that I didn't found at first - https://quality.embarcadero.com/browse/RSP-30690 the report is from July an still open.
I was a bit shocked that nobody noticed in the betas.
-
1 hour ago, Celso Henrique said:Now I have to change my code pattern to avoid mistakes from Embarcadero developers.
You should also consider to enter a QP ticket for this. I believe for this case there is no ticket yet.
-
Unfortunately this is Help Insight. For example http://docwiki.embarcadero.com/RADStudio/Sydney/en/Help_Insight show a picture as it was in Delphi XE5. So the expected behavior is still to generate a readable definition of the function.
-
I've tried to compare XML documentation in XE5 and 10.4. For this I've copied an example from the documentation http://docwiki.embarcadero.com/RADStudio/Sydney/en/XML_Documentation_Comments:
/// <summary> Removes the specified item from the collection /// </summary> /// <param name="Item">The item to remove /// </param> /// <param name="Collection">The group containing the item /// </param> /// <remarks> /// If parameter "Item" is null, an exception is raised. /// <see cref="EArgumentNilException"/> /// </remarks> /// <returns>True if the specified item is successfully removed; /// otherwise False is returned. /// </returns> function RemoveItem(Item: Pointer; Collection: Pointer): Boolean; begin // Non-XML DOC comment // ... end;
In the attachment its clear that 10.4.1 in order to save some space will combine summary, parameter descriptions, remark and return value. I why is this changed?-
1
-
-
10 minutes ago, FPiette said:So everybody will perfectly understand how long 2 months and 5 days from now represent. IMO better that 66 days.
According to Delphi it's not 66 days but 67:
Date: 15.02.2021
Days between: 67
program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.DateUtils; var X: Tdate; begin try { TODO -oUser -cConsole Main : Insert code here } x:=IncDay(IncMonth(now, 2), 5); WriteLn('Date: '+DateToStr(x)); WriteLn('Days between: '+IntToStr(DaysBetween(x, now))); ReadLn; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
-
3 minutes ago, Der schöne Günther said:Maybe a cheap way of prolonging running out of memory for the 32 bit IDE process
Also now it's running in separate process and will not bring / or slow / down the IDE. You can use the IDE to edit your code while the LSP processes are doing their jobs.
-
According to the Roadmap (https://blogs.embarcadero.com/rad-studio-roadmap-november-2020/) in Delphi 10.5 H2 2021 you can expect a better support for the M1 CPU. In the roadmap it's under Platform Enhancements macOS ARM (Delphi).
Of course as ever please do not forget this is only planned. There is no legal bound that it will be delivered in the first release of Delphi 10.5.
A more detail can be found also at https://blogs.embarcadero.com/rad-studio-november-2020-roadmap-pm-commentary/
QuoteFor 10.5, we plan to introduce a new target platform for Delphi, macOS ARM (based on Apple Silicon CPUs), significant work around IDE HighDPI support, C++ toolchain extensions, and many other additional features and quality enhancements. See below for more details.
QuoteMarco’s Commentary of 10.5 Plans
Speaking of platforms, we want to add a new target for Delphi applications: a new compiler for the ARM-based version of the macOS operating system with Apple hardware powered by Apple Silicon CPUs. While you can run Intel applications, the goal is to have a native ARM application for the new generation of Macs.This will be a significant extension of Delphi, including a new compiler, updates to the runtime library and the various high level libraries. We have also plans to expand the Delphi language syntax for all platforms and improve the performance of the math processing code the compiler generates on Windows, making applications faster in numeric processing.
At this moment the best you can do is to wait for the first beta for Delphi 10.5.
-
I would just set the property Style to csExDropDownList.
-
1
-
-
QuoteSo everything looks OK no ?
Technically there is no problem. However it could be improved:
1.) When _NewUnicodeString failes due to CharLength instead of _IntOver it should raise a more meaningful exception. For example: You cannot create string length of %d.
2.) The overflow occurs in GetTextStr. When debugging a 32 bit application you get the following call stack:
:766f9ab2 KERNELBASE.RaiseException + 0x62
:41169900
:41169900
System.Classes.TStrings.SaveToStream($3033D38,???)
System.Classes.TStrings.SaveToFile(???,nil)
System.Classes.TStrings.SaveToFile(???)
mainFRM.TForm1.Button2Click($2FCEEA0)
Vcl.Controls.TControl.Click
Vcl.StdCtrls.TCustomButton.ClickSaveToStream is focused, this almost ok as this method calls GetTextStr. I've tried again to run the 64 bit version and I get a different call stack this time:
System._RaiseAtExcept(???,???)
System.SysUtils.ErrorHandler(???,$40FA0A)
System.ErrorAt(5,$40FA0A)
System._IntOver
System._NewUnicodeString(1092000000)
System._UStrFromPWCharLen('',nil {#0},???)
System.Classes.TStrings.GetTextStr
System.Classes.TStrings.SaveToStream($302DD30,$302CDD0)
System.Classes.TStrings.SaveToFile('d:\temp\StringTest.txt',nil)
System.Classes.TStrings.SaveToFile(???)
mainFRM.TForm1.Button2Click(???)
The IDE focuses System._IntOver instead of System._NewUnicodeString. -
Now back to the original problem. This is the limitation of Delphi strings. You cannot allocate string larger than: (MaxInt - SizeOf(StrRec)) div SizeOf(WideChar) = 1073741815.
Unfortunately, internally TStringList first tries to convert its content to string and using TEncoding to a byte array. That's why it is not suitable to work with large volume of text.
-
22 minutes ago, David Heffernan said:Is your executable compiled with the overflow checks compiler option enabled?
It's quite easy to test. I've tested using:
procedure TForm1.Button1Click(Sender: TObject); var i: integer; begin i:=1024; while true do i:=i*i; ShowMessage('Completed. The result is:'+i.ToString); end;
When tested using the 64 bit the call stack is:
:00007FF965893E49 ; C:\WINDOWS\System32\KERNELBASE.dll
System._RaiseAtExcept(???,???)
System.SysUtils.ErrorHandler(???,$70AE52)
System.ErrorAt(5,$70AE52)
System._IntOver
mainFRM.TForm1.Button1Click(???)
Vcl.Controls.TControl.Click
Vcl.StdCtrls.TCustomButton.Click
Vcl.StdCtrls.TCustomButton.CNCommand(???)
System.TObject.Dispatch((no value))But it's not bad, double click on the mainFRM.Tform1.Button1Click and the debugger focues where the 32 bit debugger does, so it's just an extra step.
-
It's working for me. Try using https://getitnow.embarcadero.com/ . Also if you've used the ISO installer you've to switch getit to "online mode" (from the command line execute: GetItCmd.exe -c=useonline).
-
The easiest way to kill the compiler is to have huge cyclic unit dependencies. Try to reduce that. Also if the project was created before unit scope names were introduced you should add the scope names to the units in the uses lists and remove from project options in Unit Scope Names.
-
3
-
-
You are not adding WSNO as I wrote earlier you're adding a pointer to an address of a string returned by a function. You cannot do that. You should try something like this:
procedure TForm1.DBGrid2ColEnter(Sender: TObject); if DBGrid2.SelectedField <> CDS1.FieldByName('WSNAME') then Exit; while not MyQry.Eof do begin DBGrid2.Columns[ColIndex].PickList.AddObject(MyQry.Fields[1].AsString, Pointer(MyQry.RecNo)); MyQry.Next; end; procedure TForm1.DBGrid2ColExit(Sender: TObject); var Inx:Integer; begin if DBGrid2.SelectedField <>CDS1.FieldByName('WSNAME') then Exit; Inx:= DBGrid2.Columns[ColIndex].PickList.IndexOf(DBGrid2.SelectedField.asString); MyQry.RecNo:=integer(DBGrid2.Columns[ColIndex].Picklist.Objects[Inx]); CDS1.FieldByName('WSNO').AsString:=MyQry.Fields[0].AsString; end;
-
There are multiple problems in your code:
1.) It's not a good idea to add the address value of a return value of a function - Pointer(MyQry.Fields[0].AsString)
2.) .PickList.IndexOf('WSNAME') you are searching the index for string 'WSNAME' while you most probably meant to search the index for the value of the selected field: DBGrid2.Columns[2].PickList.IndexOf(DBGrid2.SelectedField.asString) -
type Texample = class private findex: integer; public constructor Create; reintroduce; published property Index: integer read fIndex write fIndex default -1; end; constructor TExample.create; begin inherited; findex:=-1; end;
If it's a published property you should use the default directive (when the value of the published property equals to it's default value it's not streamed to the dfm). Even if you set the default directive it's the job of the constructor to initialize the field value.
-
First you've to initialize aBytes. Try something like this:
setLength(aBytes, 1024);
wsocket.Receive(aBytes, length(aBytes));
-
1
-
-
Let's return the focus on the original question. In the IDE the blue dots represents the lines of codes that might be executed (http://docwiki.embarcadero.com/RADStudio/Sydney/en/Debugging_the_Application_(IDE_Tutorial).
IMHO nobody should expect the IDE will keep which method is where used (especially if you have a project with thousands of units). Another problem could be if you debug a code in a package. There you can have public methods that are used exclusively only from outside of the package. If the IDE would place blue dots only to reachable code from the active project you would be unable to debug those procedures.
-
Anyone with a working crystal ball that could tell when the road map will be released or at least a hotfix for https://quality.embarcadero.com/browse/RSP-30787 ?
To the RSP Marco Cantù added a comment - 14/Oct/20 11:48 AM
patch is still under testing
Almost a month later no information when we could expect to have a working Delphi 10.4.1. -
While a private method can be accessed only from inside the class and if not used doesn't require a code to be generated (there will be no blue dot). A protected/public/published methods can be used from outside the class and the code will be generated. You can write from another unit:
var vDummy: TDummy begin vDummy.B; end;
-
Maybe read the help (you should use Last):
FindLast is intended to be used together with FindPrior, FindFirst and FindNext in order to search for the last record using any filters. See the example.- Notes:
Descendant classes override FindLast to make the last record active, honoring any filters that are in effect. In descendants, FindLast returns true:
-
True
-- if the active record is successfully changed. -
False
-- if the active record is not successfully changed.
-
I asked this question in the FB Delphi developer group. Bruce McGee answered a month ago: "It's in the works". I have no idea whenever he has some insider information about it or not.
It would be really useful to know when we can expect the hotfix for the compiler error in 10.4.1. -
Are you loooking for this http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/compdirsscopedenums_xml.html ?
The $SCOPEDENUMS directive enables or disables the use of scoped enumerations in Delphi code. More specifically, $SCOPEDENUMS affects only definitions of new enumerations, and only controls the addition of the enumeration's value symbols to the global scope.In the {$SCOPEDENUMS ON} state, enumerations are scoped, and enum values are not added to the global scope. To specify a member of a scoped enum, you must include the type of the enum. For example:
{$SCOPEDENUMS ON}
type
THTMLType = (htTemplate, htStatic, htHeader, htCustom);
vHtmlReportType:=THTMLType.htTemplate; // OkvHtmlReportType:=htTemplate; // [dcc32 Error] Unit1.pas(35): E2003 Undeclared identifier: 'htStatic'
Application does not close
in VCL
Posted
It also can be that the application is generating a memory leak log when ReportMemoryLeaksOnShutdown := True it can take longer whene there is an extended leak to report.