-
Content Count
1284 -
Joined
-
Last visited
-
Days Won
28
Everything posted by Sherlock
-
That is a very good attitude and will most likely prevent this endeavor from failing. This is one of the very few examples where I actually value consultants....
-
FYI with 11.3 I get 4 Tests passed.
-
...and post the link here for us to follow, if we get the same issue.
-
Bitmaps regularly disappearing from Rectangle components
Sherlock replied to domus's topic in Delphi IDE and APIs
And once you've done that, just commit the "correct" version to your (D)VCS and since changes to forms are more seldom than changes to code you'll never have to go fish again, just refresh the form file from your repository. -
Oh, I get it! Thanks!
-
Good news indeed. Goes to show that one should not copy&paste release notes 😉
-
In the release notes: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Release_Notes#Launching_iOS_fails_with_PAServer_22
-
Switching between VMs is not that arduous... What gets to me right now is that my GetIt batch file wont work. I get either or What gives? Now I have to install everything by hand again, along with the really tedious IDE restarting....
-
It is sad to see, that PAServer on macOS still requires Python 2.7. Firstly because the guys over on the Python side always claimed breaking changes between the 2 and 3 branches where no biggie and secondly because even though they are they are fixable...
-
So I've been digging into some component codes just for the heck of it, and stumbled across a whole lot of code like the following snippet: procedure Foo; var Bar: PArrayOfByte; begin // Do some more or less elaborate thing with Bar // and in the end FreeAndNil(Bar); end; Now, first off, that is not how I had understood FreeAndNil. I always thought it to be usable for object instances. Of course one could argue, that whatever is behind a pointer could be an object itself, but I mean some thingy that was created via a TObject.Create. And sure enough, Delphi 10.4 will no longer compile stunts like these. It will give an E2010 and bluntly state that TObject and PArrayOfByte are not compatible. And rightly so. So...What to do? How to fix? Given that (in the above crude example) Bar must have been allocated memory via System.GetMem or System.New, System.FreeMem or Sysem.Dispose will do the trick, right? Why was this not done in the first place, though? Why mix paradigms at the risk of creating some unholy entity mucking up the entire system? Perhaps looking into FreeAndNil will enlighten us? This is 10.3.1s take on that method: procedure FreeAndNil(var Obj); {$IF not Defined(AUTOREFCOUNT)} var Temp: TObject; begin Temp := TObject(Obj); Pointer(Obj) := nil; Temp.Free; end; {$ELSE} begin TObject(Obj) := nil; end; {$ENDIF} And here is what 10.4 considers to be correct: procedure FreeAndNil(const [ref] Obj: TObject); {$IF not Defined(AUTOREFCOUNT)} var Temp: TObject; begin Temp := Obj; TObject(Pointer(@Obj)^) := nil; Temp.Free; end; {$ELSE} begin Obj := nil; end; {$ENDIF} Subtle, innit? Now FreeAndNil requires the thing it's supposed to free and nil to be of TObject, which is cool. But it also considers it to be const...why is that? I learned const renders the parameter unmodifiable, see here: http://docwiki.embarcadero.com/RADStudio/Rio/en/Parameters_(Delphi)#Constant_Parameters. I also took a wrong turn somewhere and ended up in this C++ explantion of const http://docwiki.embarcadero.com/RADStudio/Rio/en/Const in detail this sentence: "A const pointer cannot be modified, though the object to which it points can be changed." OK, so we can change the object, we are freeing it after all. But then we also change where the pointer points to, by niling it. Now that should violate the const boundary, but it does not. Is it because of the "fancy shmancy" use of @s and ^s here? TObject(Pointer(@Obj)^) := nil; Why? Why go to the lenghts of casting, adressing and dereferencing? What are your thoughts and comments on this? I think this almost cured my urge to look into the sources of other people 🤣
-
Just to mention another service: https://www.macincloud.com/
-
@programmerdelphi2k I don't have a problem, what problem are you talking about? You had better either respond using quotes or address the person you would like to respond to directly. But posts like yours might very well lead to further misunderstandings.
-
The var goes before the begin. procedure TfDesignMaster.PopulatePdlNotesWithValuePack(Sender: TObject); var stocknummm,value,value1,value2,keyfields, fieldname: string; F: TField; i: integer; lresult: boolean; fn: TStringList; sl: TStringList; begin fn:=tstringlist.create; sl:=tstringlist.create; Surprisingly the DocWiki does not clarify this: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Variables_(Delphi) at least on that page.
-
The issue I have with the (not so new) browser approach is as follows: It promotes a browser monoculture. A little bit over 10 years ago IE was a must have in the corporate world, because all the renowned applications would run on it, and only it. No other browsers could be used, and therefore as soon as somebody wanted to browse the internet, in some companies they where forced to use IE, resulting in catastrophic security issues, because MS got lazy and complacent in their browser development. Everybody that counted needed it, and anybody that didn't like it didn't count. But this got so far that the fine people who developed browser based applications got just as lazy and complacent ("learning from MS means winning" and so forth), resulting in even worse applications, that only ran on specific IE versions. It was then that responsible IT departments had to allow the installation of other browsers, if only to allow for safe browsing. IE was the biggest target for malware by far.... I have taken a lunch break and noticed I drifted off. So let me get back to the point. The only good reason for browser based applications is the zero install "feature". I admit, that is a tough one, for the usual Java, .net crowd what with their frameworks and version jungle and so forth. But for us Delphians? Come on! As I always say: monolithic applications rule! No need to install pesky frameworks, DLLs or other version dependent nuisance, just run it from a network share. As for the current browser high. Do they really check if their applications work with all browsers in all OSes? Short answer is "No" which leads us to monoculture with all the bad things that entails.
-
Well, being the best it has ever been does not really mean it will be great. It simply means it wont be as bad as it is now.
-
Ugh, don't you just hate it when that happens?
-
Is that still a valid deterrent?
-
I could readily accept such a statement for VCL, but still FMX tends to change a lot. Less than in the XE versions of Delphi but still.
-
I hope your customers only use one version, i.e. no custom tailored versions. Furthermore I hope your boss or whoever is responsible knows every single feature, no matter how small. Because customers can get really "special" when something no longer works as expected, just because of a new version, especially one they have to pay for - assuming the rewrite will not be for free.
-
Is there a Delphi equivalent of WriteStr ?
Sherlock replied to Martin Liddle's topic in RTL and Delphi Object Pascal
Hmm almost sounds like a job for TWriter.WriteString which writes to a TStream. If you don't want it to be a file, it could be a TStringStream. -
A comprehensive guide to Delphi programming language functions and procedures
Sherlock replied to pouyafar's topic in VCL
Too much has happened with links that lead to previously unknown sites. Bear with us, we'll learn to trust each other soon enough. -
A comprehensive guide to Delphi programming language functions and procedures
Sherlock replied to pouyafar's topic in VCL
@pouyafarThanks for that! And the tables would contain function names with some explanations, correct? -
A comprehensive guide to Delphi programming language functions and procedures
Sherlock replied to pouyafar's topic in VCL
Those links seem quite harmless. It's just two sites translated from persian to english. Second link is pouyafars blog and the first is a forum. I don't see the immediate need to act. And translate.goog belongs to google. -
Some more fun with ChatGPT and Delphi
Sherlock replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
The common link is clear but the evolution of use and meaning is just baffling to me. -
Some more fun with ChatGPT and Delphi
Sherlock replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
ROFL....sorry, but in german "gammel" means "rotten". This is just too funny how related and then again not our languages are.