Lajos Juhász
Members-
Content Count
986 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Lajos Juhász
-
If you really want to use TWebBrowser you must set FEATURE_BROWSER_EMULATION before using the component (Windows is going to remove it from the registry constantly). Of course this is only a short term solution as IE is dead.
-
Delphi 10.4.2 won't open a specific .PAS file
Lajos Juhász replied to MJBComp's topic in Delphi IDE and APIs
I didn't started this thread. I just don't care anymore when something doesn't work in the IDE. I already failed to make a test case for more interesting bugs. I just like to use my time in a more productive way. -
Delphi 10.4.2 won't open a specific .PAS file
Lajos Juhász replied to MJBComp's topic in Delphi IDE and APIs
There are problems with ctrl+click to open files in D11.1 I didn't checked the RSP. (We can only hope that the beta testers will fill enough bug report on this issue and it will be fixed in the next versions. Dear beta testers the future of the Delphi community is in your hands). -
In the older version TDBImage didn't supported anything but bitmaps. That's why we used TEDBImage (there are also other sources still floating on the internet how to handle multiple formats in a blob stream).
-
DBGrid repaint or refresh when dataset is refreshed
Lajos Juhász replied to ChrisChuah's topic in Databases
You can read the protected leftcol property of the grid: type TCrackDBGrid = class(TDBGrid); TCrackDBGrid(DBGrid1).LeftCol will return the first column of the screen. -
Usually this happens when you install a faulty package to the IDE. Try to uninstall every third party components. You can also try to start the IDE with a new registry key using the -r command line switch (https://docwiki.embarcadero.com/RADStudio/Alexandria/en/IDE_Command_Line_Switches_and_Options).
-
What is the meaning of the square bracket in here?
Lajos Juhász replied to stacker_liew's topic in RTL and Delphi Object Pascal
I know I was tired and english is not mother tongue that's the reason why I later removed my original post. -
The relative path should be ..\SharedCode\FileUtils.pas. I opened a dpr and dproj for an application and there the paths are relative.
-
What is the meaning of the square bracket in here?
Lajos Juhász replied to stacker_liew's topic in RTL and Delphi Object Pascal
Edit. Sorry it's late. -
[Android] How to change regional settings
Lajos Juhász replied to Fabian1648's topic in Cross-platform
Well, you're still changing the year from 2 digits to 4. Anyway Vandrovnik gave you the code I would use. -
does SetLength for an array actually release memory?
Lajos Juhász replied to dummzeuch's topic in RTL and Delphi Object Pascal
I peeked at the source code and it calls ReallocMem thus should work as expected. -
[Android] How to change regional settings
Lajos Juhász replied to Fabian1648's topic in Cross-platform
You failed to show us an example where are you have a problem. You can use FormatDateTime or DateToStr with yuor own format settings. -
[Android] How to change regional settings
Lajos Juhász replied to Fabian1648's topic in Cross-platform
If you change the regional settings in your application you will change it in all of the countries the same thing as far as I can see. -
DBGrid repaint or refresh when dataset is refreshed
Lajos Juhász replied to ChrisChuah's topic in Databases
https://stackoverflow.com/questions/849568/how-long-does-a-tdataset-bookmark-remain-valid Answer from Jeroen Wiert Pluimers: Like both c0rwin and skamradt already mention: the bookmark behaviour depends on the TDataSet descendant you use. In general, bookmarks become invalid during: close/open refresh (on datasets that support it) data changes (sometimes only deletions) I know 1. and 2. can invalidate your bookmarks in TClientDataSets. I am almost sure that for TClientDataSets it does not matter which underlying provider is used (TSQLQuery, TIBQuery, etc). The only way to make sure what works and what not is testing it. Which means you are totally right in not using them: bookmarks have an intrinsic chance of being unreliable. To be on the safe side, always call BookmarkValid before going to a bookmark. -
[Android] How to change regional settings
Lajos Juhász replied to Fabian1648's topic in Cross-platform
Why would you like to change the regional settings for that case? Use a custom format to convert the date to string. -
You would have to use filter, locate of partialkey always starts at the first letter (matches the beggining of the value).
-
Is it possible to see how compiler defines parameters?
Lajos Juhász replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
When you've a simply example than it's trivial to see a bug. Trouble is when you change old code in hurry (critical error for what a fix must be delivered instantly) and introduce another one. For example, when you have a TStringList with objects you can cast the string instead of the object. For example, in a longer code it can be difficult to spot (you read in hurry and looks ok, you know that the object is inside the list): TMyObject(fMyStringList[lItemIndex]).DoSomething instead of: TMyObject(fMyStringList.objects[lItemIndex]).DoSomething. while this will not compile: (fMyStringList[lItemIndex] as TMyObject).DoSomething. The same goes with the original example in this thread as operator instantly shows that the cast is not valid. Disclaimer. With generics you can reduce the required typecasts however I still have to work on some D2007 code and most of the code was writen using Delphi 5. -
Is it possible to see how compiler defines parameters?
Lajos Juhász replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
As operator checks whenever your are doing a valid type conversion or not (if not exception is raised), while when writing TypeName() it will do the conversion without a check. Thus it's a valid in Delphi to write: TStringList(4).Add('Test') Now the compiler will pretend that the constant 4 is a TStringList and call the Add method on it. This is an easiest way in Delphi to have an Access Violation. (BTW. This is a reason why I started to use as instead of hard type cast recently.) -
Even if you leave png or bmp as image source you should move to ImageCollection and VirtualImageList to support various DPIs your users could use. You can also watch this video:
-
Community Edition expiring again, no new keys
Lajos Juhász replied to Nigel Thomas's topic in Delphi IDE and APIs
This forum is not supported/sponsored by Embarcadero or Idera. You cannot expect an answer here. (Lately they don't feel any need to anser any of the product related questions.) -
Install of RAD Studio, C++Builder 11.1.5
Lajos Juhász replied to Roger Cigol's topic in General Help
Only minor changes are released to not require uninstall. -
Install of RAD Studio, C++Builder 11.1.5
Lajos Juhász replied to Roger Cigol's topic in General Help
When in the release notes they write full installation it means uninstall and reinstall. On webinars more than once was a question why they request the uninstall steps why not just replace the files. The answer is that it's easier to test and less change to have an error. (It makes sense but a bit more work when you have to install a "patch" of 6GB). -
Install of RAD Studio, C++Builder 11.1.5
Lajos Juhász replied to Roger Cigol's topic in General Help
Here it is: https://blogs.embarcadero.com/available-today-the-cbuilder-and-rad-studio-11-1-5-c-code-insight-update/ The relevant part is: Being tightly focused on C++, the 11.1.5 C++ Code Insight Update has no benefit for Delphi customers and we do not recommend Delphi customers to install it. Other than the C++ Code Insight changes, 11.1.5 is identical in features to 11.1. RAD Studio 11.1.5 is a full installation, and includes all hotfixes issued for 11.1. -
I know that this will not help, but Delphi has only __history and __recovery folders by default. I don't see any _astcache. From the name it should be some kind of cache folder and should not be in the git repository.
-
As far as I remember this should be i:=0; SetLength(CompanyDataBase, FileSize(f)) while not eof(f) do begin Read(f, CompanyDataBase); inc(i); end; Last time I wrote a code like this was in Pascal. (Btw. to be on the safe side you should also define the record as packed).