-
Content Count
3416 -
Joined
-
Last visited
-
Days Won
113
Everything posted by Lars Fosdal
-
Lots of Py support in VSCode too.
-
Whenever I am in VSCode, I am looking at the Delphi IDE and sighing. Its age is starting to show.
-
Records, Generics and RTTI meets FireDAC
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
As ORMs go, this one would be veeery light weight. -
Invalid Compiler Directive: 'MESSAGES'
Lars Fosdal replied to Incus J's topic in ICS - Internet Component Suite
Shift-F7 - Trace to Next Source Line -
Records, Generics and RTTI meets FireDAC
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
For us, it is typically third party systems that deal with production handling, i.e. whenever something is labeled with a serial number and/or a weight, - or added, removed or repositioned in some robotic storage system, or a laboratory system changes the approval status of a production batch. The WMS needs to know what is where, in what condition, at all times. The architecture is over a decade old, and if redesigned from bottom up today - probably none of the involved parties would have direct access to the DB. None of our software uses data-aware components. -
I freaking loathe those explicit... props. Whoever introduced them should have had all their key caps removed.
-
Unit scope names in IDE - possible 2+ lines?
Lars Fosdal replied to Mike Torrettinni's topic in General Help
I didn't know that shortcut, but for me it also woke up the Intel gfx settings. As you said, you can disable the hotkeys in that app - and suddenly, Ctrl+Alt+F12 drops down the opened unit list. Thanks, man! -
Unit scope names in IDE - possible 2+ lines?
Lars Fosdal replied to Mike Torrettinni's topic in General Help
There is also that little drop down at the right end of the unit tabs. Otherwise, Ctrl+F12 is nice as well. -
Records, Generics and RTTI meets FireDAC
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
@Attila Kovacs The SPs often contain business logic, validation/sanitation, state change logging, queueing to signaling mechanisms, etc. - and can be called from multiple external systems. With a lot of concurrent actors, transactional integrity is a challenge. -
Records, Generics and RTTI meets FireDAC
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
@Jacek Laskowski We don't do direct insert/update/delete operations from the client software - but have to explicitly call stored procs instead. Client does not have rights to do inserts/updates - and may only call a specific set of database routines. -
Records, Generics and RTTI meets FireDAC
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
@Attila Kovacs - ORMs are nice, but this project didn't use one. -
Records, Generics and RTTI meets FireDAC
Lars Fosdal replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
Nice one, Uwe! I see I am late to the show 🙂 -
UCS4StringToWideString broken?
Lars Fosdal replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
@A.M. Hoornweg Being a bit pedantic now, but you would save the QA and developers quite a bit of work if your example was a complete console program. -
Remove non-utf8 characters from a utf8 string
Lars Fosdal replied to borni69's topic in Algorithms, Data Structures and Class Design
It's not in Rio either. -
@Ian Branch - I deleted the post. It was mostly off topic, which seems to be my default modus operandi
-
Is variable value kept after For.. in ... do loop?
Lars Fosdal replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
Yeah... you are not the only one. -
Is variable value kept after For.. in ... do loop?
Lars Fosdal replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
Which means lists and arrays of objects may be preferable over lists and arrays of records in certain situations. -
Is variable value kept after For.. in ... do loop?
Lars Fosdal replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
So, looping an array of records using for v in array, can be significantly more expensive than indexed access using for vx := Low(array) to High(array), given the size of the record? -
git - do you 'pull' before/after switching branches?
Lars Fosdal replied to David Schwartz's topic in General Help
It is good practice to pull / update, CHECK AND COMPILE before push / commit. I agree with Dalija and Anders that if there are unintended cosmetic changes in a commit (explicit form coordinates / white space), it is good practice to discard the changes before the commit. That really simplifies looking for actual changes in the version history later. And - for the love of developer team sanity - write proper push / commit statements 😛 Edit: To clarify - comment the scope and purpose of the changes. If there are caveats, they should be comments in the code, not in the commit. -
Remove non-utf8 characters from a utf8 string
Lars Fosdal replied to borni69's topic in Algorithms, Data Structures and Class Design
Isn't single characters in the #128-#255 range invalid in UTF8, if not prefixed to form a sequence? Are there per definition, UTF8 sequences that are invalid? -
Is variable value kept after For.. in ... do loop?
Lars Fosdal replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
http://docwiki.embarcadero.com/RADStudio/Sydney/en/Declarations_and_Statements_(Delphi)#For_Statements For to rules are pretty clear: For in rules are a bit general: I am not sure how this would be a problem if we are talking about a loop over a list of objects, as we then would be passing a reference to the list object? I have not really thought about how the variable of a for in loop over an array of records is kept. Do we see a deep copy of the array element in the loop variable, or is there pointer magic involved? I can see how this could be a problem if the reference passed is to a local stack copy. -
@Carlo Barazzetta, This looks awesome, but I found a bug and identified the cause. https://github.com/EtheaDev/SVGIconImageList/issues/119 Luckily it was possible to work around the bug by removing the offending section.
-
string helpers question
Lars Fosdal replied to David Schwartz's topic in RTL and Delphi Object Pascal
ROFL! -
Help needed. Re-raising exception gives AV.
Lars Fosdal replied to a topic in RTL and Delphi Object Pascal
https://quality.embarcadero.com/browse/RSP-31084 -
Help needed. Re-raising exception gives AV.
Lars Fosdal replied to a topic in RTL and Delphi Object Pascal
program SydnetExceptionsReRaise; {$APPTYPE CONSOLE} uses System.SysUtils; function LogExceptionFunc(const E: Exception): string; begin Result := E.Message; Writeln('Func Log + ' + E.Message); end; procedure LogExceptionProc(const E: Exception); begin Writeln('Proc Log + ' + E.Message); end; procedure Test1_OK; begin try try raise Exception.Create('This is a raised Exception'); except on E: Exception do begin LogExceptionProc(E); raise; end; end; except on E: Exception do begin Writeln('Test 1 ', E.ClassName, ': ', E.Message); end; end; end; procedure Test2_OK; var lMessage: string; begin try try raise Exception.Create('This is a raised Exception'); except on E: Exception do begin lMessage := LogExceptionFunc(E); raise; end; end; except on E: Exception do begin Writeln('Test 2 ', E.ClassName, ': ', E.Message); end; end; end; procedure Test3_Fail; begin try try raise Exception.Create('This is a raised Exception'); except on E: Exception do begin LogExceptionFunc(E); raise; end; end; except on E: Exception do begin Writeln('Test 3 ', E.ClassName, ': ', E.Message); end; end; end; begin try try Test1_OK; Test2_OK; Test3_Fail; except on E: Exception do begin Writeln('Unexpected ',E.ClassName, ': ', E.Message); end; end; finally Write('Press Any Key'); ReadLn; end; end. Here you go. No joke.