-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
Why should I use good source control versioning system?
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
I would argue on that. Several times I accidentally got my commits overridden and restored them undamaged with git reflog. -
Is interposer class really best to customize TPanel.Paint?
Fr0sT.Brutal replied to Mike Torrettinni's topic in VCL
It's just a common practice. You can easily define a standalone class with such method if you want. But overriding and inheriting is more powerful solution. Everything depends on your needs -
Is interposer class really best to customize TPanel.Paint?
Fr0sT.Brutal replied to Mike Torrettinni's topic in VCL
Well, it's somewhat an overhead. My solution was to assign an event handler like with any component: Panel1.OnPaint := Form1.Panel1Paint Thus you can have special paint for every of your panels Alternatively, if you prefer storing methods in the object itself, you can just use a flag and add the method: TPanel.Paint begin if DoCustomPaint then CustomPaint; end; Panel1.CustomPaint := True but then all panels will share the same painting method -
Why should I use good source control versioning system?
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
I added shortcuts to my file explorer with main commit/push/pull/log commands and rarely use context menu. What do you mean? I use SmartGit for SVN projects and find it quite awkward -
Is interposer class really best to customize TPanel.Paint?
Fr0sT.Brutal replied to Mike Torrettinni's topic in VCL
This means all the visual component mess: separate package, installation, registration, replacing existing panels, bundling it with an app etc. TPanel = class(Vcl.ExtCtrls.TPanel) protected procedure Paint; override; public OnCustomPaint: TNotifyEvent; end; procedure TPanel.Paint; begin if Assigned(OnCustomPaint) then OnCustomPaint(Self) else inherited; end; I would do something alike -
Stable Communication between ICS TSslWSocket and TSslWSocketServer
Fr0sT.Brutal replied to idontknow's topic in ICS - Internet Component Suite
I'd advice you to get rid of threads and try very-very simple case. Like Angus said, threads in ICS are pretty advanced thing- 12 replies
-
- ics
- tsslwsocketserver
-
(and 2 more)
Tagged with:
-
Stable Communication between ICS TSslWSocket and TSslWSocketServer
Fr0sT.Brutal replied to idontknow's topic in ICS - Internet Component Suite
I would check if your thread stuff is correct. With ICS you usually don't need threads. procedure TServerThread.ScDataAvailable(Sender: TObject; ErrCode: Word); begin if ErrCode = 0 then begin Socket := TwSocketClient(Sender); while (True) do begin BytesReceived := Socket.Receive(pBuffer, 32768); if BytesReceived <= 0 then Exit; end; end end This is wrong. I guess you've come from blocking socket world. ICS is async so you've to learn its completely different approach.- 12 replies
-
- ics
- tsslwsocketserver
-
(and 2 more)
Tagged with:
-
I wasn't aware of it too; so at least one useful thing PP did for me. Though I haven't got the need for ignore list at all until he appeared...
-
TFtpClient: Very low speed on transfer data
Fr0sT.Brutal replied to Alexey Ischuk's topic in ICS - Internet Component Suite
$10000 is harder to misspell 😉 -
enums with duplicate values
Fr0sT.Brutal replied to dummzeuch's topic in RTL and Delphi Object Pascal
Not tricky, they just have no RTTI 😄 Interesting ability, wasn't aware of it -
When can Class.Create fail?
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
...and should never raise exception itself -
Class fields as parameters or refer to fields directly?
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
There's a strong opinion pro using parameters for the sake of testability. Some people even insist on using pure functions (those which do not use external variables at all) as much as possible. But everything depends on your needs and use cases. My opinion is to try with parameters; if you need to tie some values to an object, then use fields -
Include files for checking compiler versions and capabilities. Useful for developers of libs/components that have to support multiple compilers. https://github.com/Fr0sT-Brutal/Delphi_Compilers Additionally, there are files for checking current compiler settings, some cross-compiler and cross-platform defines and cross-compiler declarations.
-
Likely it is. I looked at that file and got lost in these loooong nested defines so won't argue
-
I'm glad to help 🙂 Well, I've never used JEDI as is right because of its monsterosity. Moreover their basic define system has the critical weakness - it must be updated for every new compiler version; and it's DAMN long while I wanted short and universal solution. Caps are compiler capabilities... I don't remember why I called them so. SUPPORTS is longer but acceptable as well, agreed. You're right, that was previous, quite weak, sample. I already changed it to check for 64 and 32 bitness explicitly. Oh and there's another bug indeed - I used "X" letter in defines which means Intel arch. In fact, it was meant to be CPU32/64 (FPC-style) which are defined for Delphi in XPlatformCompat.inc file.
-
Invalid Compiler Directive: 'MESSAGES'
Fr0sT.Brutal replied to Incus J's topic in ICS - Internet Component Suite
I just thought that change would shed some light on what was done for OSX because symptoms seem similar -
Calling an "application" from windows service
Fr0sT.Brutal replied to Clément's topic in RTL and Delphi Object Pascal
Calling apps from server is OK. This is how CGI works. -
Invalid Compiler Directive: 'MESSAGES'
Fr0sT.Brutal replied to Incus J's topic in ICS - Internet Component Suite
http://docwiki.embarcadero.com/RADStudio/XE8/en/What's_New_in_Delphi_and_C%2B%2BBuilder_XE8#Changes_in_LongInt_and_LongWord_Size_for_64-bit_iOS_Platforms -
TFtpClient: Very low speed on transfer data
Fr0sT.Brutal replied to Alexey Ischuk's topic in ICS - Internet Component Suite
Try to increase socket buffers -
ICS v8.64 can't compile on Delphi 7
Fr0sT.Brutal replied to Kyle_Katarn's topic in ICS - Internet Component Suite
Yep I've seen similar cases, mostly they're solved by conditional usage of AnsiStrings unit controlled by HAS_ANSISTRINGS define Yes, still not implemented. I plan to make additions in the near future upd Added 10.4 and some more defines for previous versions -
How to keep track/organize all overloaded, extended 3rd party source code?
Fr0sT.Brutal replied to Mike Torrettinni's topic in General Help
IMHO: 1. Think if a feature could be useful for others, if yes - suggest it to developer 2. Try to implement it by inheriting, class helpers, class hacks etc 3. If nothing helps, go the way of source modifying. But prepare to handle all updates manually. Luckily most of this work could be done with source control systems. I keep several personally needed changes to ISC, VTV, FastReport but where possible I use class helpers (VTV) or inheritance (ICS). Sometimes the following trick helps a lot: type class TSomeStdClassExt = class(TSomeStdClass) ... // some additional stuff end; class TSomeStdClass = TSomeStdClassExt; var someobj: TSomeStdClass; // will be of class TSomeStdClassExt actually It is especially useful for visual controls b/c you don't have to register new control, replace old ones with new ones and so on. -
ICS v8.64 can't compile on Delphi 7
Fr0sT.Brutal replied to Kyle_Katarn's topic in ICS - Internet Component Suite
Well, when you buy a license for some version, you get all previous ones so there's nothing complicated in having all required versions available. Anyway you can contribute to Jedi inc file or to my abovementioned repo to make info available for others. -
ICS v8.64 can't compile on Delphi 7
Fr0sT.Brutal replied to Kyle_Katarn's topic in ICS - Internet Component Suite
Most of these checks could be performed with IF DECLARED clause. Thanks to it very few features must be defined manually, just some language features or unit relocations. I maintain a repo with defines for main compiler features here so use the provided info freely or make PR's/issues to add something that is missing. -
Wanted: Experienced lead-developer and architect with a musical passion
Fr0sT.Brutal replied to Hans♫'s topic in Job Opportunities / Coder for Hire
Alas... I only played drums for half a year ten years ago so don't fit the requirements 😞 -
ICS v8.64 can't compile on Delphi 7
Fr0sT.Brutal replied to Kyle_Katarn's topic in ICS - Internet Component Suite
IDK what things you mean. Backward compatibility is pretty strong in current versions as main changes happened in D2009..XE2. So newer versions require very little changes, especially if you don't use newest features (and you have to avoid them if you care about older versions)