-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
The software industry has moved to the Web, why?
Fr0sT.Brutal replied to Skrim's topic in General Help
I guess the domain is enterprise-level apps residing in LAN and using DB/remote services anyway. Of course, ultimately moving stuff like IDE, notepad or office to 3rd party cloud is pretty bad idea (however, they are nice working in parallel with traditional software) -
This one is industry standard
- 21 replies
-
- vcl
- devexpress
-
(and 2 more)
Tagged with:
-
Writing & Reading as a Console App?
Fr0sT.Brutal replied to Steve Maughan's topic in RTL and Delphi Object Pascal
You can get handles of STDIN/OUT hStdin := GetStdHandle(STD_INPUT_HANDLE); hStdOut := GetStdHandle(STD_OUTPUT_HANDLE); and then call usual Read/WriteFile -
New blog post: Leveraging ChatGPT to generate a Delphi class along with CRUD code from a table schema
Fr0sT.Brutal replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
While I'm impressed on ChatGPT's abilities to generate mechanic code, this very example is only good for quick MVP and not serious production. Modifying a field requires changes in 3 places. The best option would be universal RTTI-based approach or the class should be generated always based on JSON schema. Anyway it's kind of new generation RAD tool. However, just like with Delphi RAD features, there's a moment when you throw out almost all of them and just create/init components in code 🙂 -
The software industry has moved to the Web, why?
Fr0sT.Brutal replied to Skrim's topic in General Help
Yes, unbeatable argument. All this mess of multiple OS-dependent builds, OS incompatibility, outdated versions and users that don't want to upgrade because they like everything and the new version is a piece of bell&whistle shit (I am the one!)... Moreover, multi-device adaptation is built-in. All you have to do is check UI on different types of devices and that's all. -
I like W7 much better than W10. For me, W10 just don't have enough sweeties to upgrade. Moreover, in some aspects it is worse
-
Thanks, good to know that. I prefer standardized formats for simple interoperability but likely there are cases where such Delphi-only solutions could win.
-
C++ Builder 10.4 (free version) installation fails: CReateProcess ErrorCode 2
Fr0sT.Brutal replied to LordTde's topic in General Help
First you'll have to wait for those who speak French to understand what the message is- 8 replies
-
- installation
- bds.exe not found
-
(and 2 more)
Tagged with:
-
Memory Leak when loading/unloading Delphi DLL
Fr0sT.Brutal replied to Thomas B's topic in Windows API
Will the bug show when host app is built with Delphi? It would significantly simplify case reproducing -
Interesting, is it common practice to use Delphi-specific object streaming to store data? What if object structure changes?
-
Don't forget to check if deleted component is referred by other components! On delete these refs just get emptied silently. Form view as text will help on this. Anyway form text view helps much because you can see all non-default properties of a component including event handlers. Then do text search by component name to find all refs
-
ICS has plenty of samples, just look at them.
-
How to enter unicode symbols into the Delphi IDE
Fr0sT.Brutal replied to Dave Novo's topic in Delphi IDE and APIs
If the set of used chars is short, you can use templates as well (built-in RAD ones or from cnPack or other helper wizard). -
ISO's are publicly available via http and ftp though the links are not published officially. However the very situation sucks.
-
WinInet InternetGetFile + some custom code for checking version and launching the setup @aehimself also published some code for this IIRC
-
In fact, Delphi teaches us bad things with all this visual & RAD button-dropping. It's good for small apps but when they grow, old habits remain and lead to these nightmare. I was in the same situation with an app started when I started learning Delphi so it's evolving with me. In that app I significantly reduced the number of objects in datamodules by changind all temporary queries (that is, those which do not have any datasource attached) from design-time components to temporary objects created at run-time. Their SQLs are defined as literals in datamodule unit and field list is generated dynamically. And with interface-based wrapper the code is pretty simple with GetTempQuery(Database).Q do begin SQL.Text := SQL_Insert; Params ... ExecSQL; end;
-
Can the packages setup be updated for ICS in new versions?
Fr0sT.Brutal replied to Geoffrey Smith's topic in ICS - Internet Component Suite
Hmm, probably a file like Packages\CoolLib_DelphiXE-Up_R.dproj would point them to the right idea? Or maybe CoolLib_DelphiXE-UP-TO-ANY-NEWER-FUTURE-OR-PAST-VERSION_R.dproj -
Is there a Delphi equivalent of WriteStr ?
Fr0sT.Brutal replied to Martin Liddle's topic in RTL and Delphi Object Pascal
it has: `%10d` You can borrow the code from GNU Pascal but you'll have to wrap arguments into array. Delphi doesn't support user functions with undefined number of arguments -
Can the packages setup be updated for ICS in new versions?
Fr0sT.Brutal replied to Geoffrey Smith's topic in ICS - Internet Component Suite
I'd be happy to know there's no issues but in this case why so many component dev's still maintain personal package files for every supported IDE version? -
Can the packages setup be updated for ICS in new versions?
Fr0sT.Brutal replied to Geoffrey Smith's topic in ICS - Internet Component Suite
If only IDE didn't consider these files as its private territory where it could do whatever it wants -
Can the packages setup be updated for ICS in new versions?
Fr0sT.Brutal replied to Geoffrey Smith's topic in ICS - Internet Component Suite
So the garbage actually exists (produced by version differences), it's only IDE that does good job upgrading older project files -
Many of us miss call stacks in Delphi and have to use heavy or commercial libs. Luckily Microsoft cares of us and provides necessary API's. Here's the unit // Stack tracing with WinAPI // (c) Fr0sT-Brutal // License MIT unit StackTrace; interface {$IFDEF MSWINDOWS} uses Windows, SysUtils; const DBG_STACK_LENGTH = 32; type TDbgInfoStack = array[0..DBG_STACK_LENGTH - 1] of Pointer; PDbgInfoStack = ^TDbgInfoStack; function RtlCaptureStackBackTrace(FramesToSkip: ULONG; FramesToCapture: ULONG; BackTrace: Pointer; BackTraceHash: PULONG): USHORT; stdcall; external 'kernel32.dll'; procedure GetCallStackOS(var Stack: TDbgInfoStack; FramesToSkip: Integer); function CallStackToStr(const Stack: TDbgInfoStack): string; procedure InstallExceptionCallStack; {$ENDIF} implementation {$IFDEF MSWINDOWS} procedure GetCallStackOS(var Stack: TDbgInfoStack; FramesToSkip: Integer); begin ZeroMemory(@Stack, SizeOf(Stack)); RtlCaptureStackBackTrace(FramesToSkip, Length(Stack), @Stack, nil); end; function CallStackToStr(const Stack: TDbgInfoStack): string; var Ptr: Pointer; begin Result := ''; for Ptr in Stack do if Ptr <> nil then Result := Result + sLineBreak + Format('$%p', [Ptr]) else Break; end; function GetExceptionStackInfo(P: PExceptionRecord): Pointer; begin Result := AllocMem(SizeOf(TDbgInfoStack)); GetCallStackOS(PDbgInfoStack(Result)^, 1); // excluding the very function GetCallStackOS end; function GetStackInfoStringProc(Info: Pointer): string; begin Result := CallStackToStr(PDbgInfoStack(Info)^); end; procedure CleanUpStackInfoProc(Info: Pointer); begin Dispose(PDbgInfoStack(Info)); end; procedure InstallExceptionCallStack; begin Exception.GetExceptionStackInfoProc := GetExceptionStackInfo; Exception.GetStackInfoStringProc := GetStackInfoStringProc; Exception.CleanUpStackInfoProc := CleanUpStackInfoProc; end; procedure UninstallExceptionCallStack; begin Exception.GetExceptionStackInfoProc := nil; Exception.GetStackInfoStringProc := nil; Exception.CleanUpStackInfoProc := nil; end; {$ENDIF} end. test project program Project2; {$APPTYPE CONSOLE} {$R *.res} uses Windows, SysUtils, StackTrace in 'StackTrace.pas'; // Demo subs procedure Nested2; begin Abort; end; procedure Nested1; begin Nested2; end; procedure Nested0; begin Nested1; end; begin try InstallExceptionCallStack; Nested0; except on E: Exception do Writeln(E.ClassName, ': ', E.Message, sLineBreak, E.StackTrace); end; Readln; end. and output
-
Exception call stacks on Windows with only a few LOCs
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in I made this
Do you mean you get all the 32 entries of call stack filled? Try to enlarge DBG_STACK_LENGTH then. I don't remember why I chose the value of 32, I've re-read MSDN and saw no limitations on stack size. -
Can the packages setup be updated for ICS in new versions?
Fr0sT.Brutal replied to Geoffrey Smith's topic in ICS - Internet Component Suite
Hmm, didn't dproj schema change over compiler versions? It could be hard to downgrade instead of upgrade. -
Some more fun with ChatGPT and Delphi
Fr0sT.Brutal replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Seems like pretty good lyrics for a new Manowar song 😄