PeaShooter_OMO
Members-
Content Count
76 -
Joined
-
Last visited
Community Reputation
11 GoodRecent Profile Visitors
-
Circular references with API design
PeaShooter_OMO replied to Darian Miller's topic in Algorithms, Data Structures and Class Design
@Darian Miller In times like these I just use pointers. Not sure whether that will affect the API interaction though. PRecordB = ^TRecordB; PRecordC = ^TRecordC; TRecordA = record Field1 : Integer; Field2 : PRecordB; Field3 : string; TopX : PRecordC; end; TRecordB = record Field4 : Integer; Field5 : TRecordA; end; TRecordC = record Items : TArray<TRecordA>; end; -
Auto-Fontsize , Colwidths, RowHeights at Grid / TMS TAdvstringgrid
PeaShooter_OMO replied to o815's topic in VCL
@o815 TAdvStringGrid does not have any functionality to satisfy your request, at least not as far as I can remember. You will have to iterate font sizes to do that. You can have a look at Canvas.TextHeight Canvas.TextWidth Canvas.TextExtent -
Another thing to consider is the visual aspect. When you disable a single control it may have a change in its visual representation as is the case with a button or an edit box that goes gray/grey and for good reason because that gives an indication to the user that it has been disabled. If you want that level of indication then you will have to disable each visually relevant control by itself. Disabling a parent container control does not affect the child controls visually. Disabling a few controls are easy and just a few lines but if you have many then you can loop through them and disable them that way. Have a look at the Controls and ControlCount properties of the parent containers (Form, Panel, TabSheet, GroupBox).
-
Delphi - Direct2D - Paintbox drawing is flickering
PeaShooter_OMO replied to Achille PACE's topic in VCL
.. -
I use TEdgeBrowser and it creates a sub-folder in the folder where my executable is outputted to. It is called <name of executable>.exe.WebView2 Many folders in it seem to be related to "Cache" Do you have such a folder?
-
Casting an untyped pointer to a typed when using with New() and Dispose()
PeaShooter_OMO replied to PeaShooter_OMO's topic in RTL and Delphi Object Pascal
@PeterBelow @DelphiUdIT I understand and edited my post. -
Casting an untyped pointer to a typed when using with New() and Dispose()
PeaShooter_OMO posted a topic in RTL and Delphi Object Pascal
type TMyRec = record Int : Integer; Str : String; end; PMyRec = ^TMyRec; var LPointer : Pointer; begin New(PMyRec(LPointer)); PMyRec(LPointer)^.Int := 200; PMyRec(LPointer)^.Str := 'Blah'; Dispose(PMyRec(LPointer)); end; I do not know why this approach bothers me but for some reason it does. I am casting a Pointer to a PMyRec to use it with New() and Dispose(). I do not get a memory leak from this so I am assuming it will be operating correctly. Am I right? Edit: I understand that typed pointers are to be used with New() and Dispose(). This is just an experiment into the working of the memory around this and also New() and Dispose(). That's all. -
Can a Send be done outside the thread a TWSocket is attached to?
PeaShooter_OMO replied to PeaShooter_OMO's topic in Network, Cloud and Web
What should be deleted? Your reply? -
Can a Send be done outside the thread a TWSocket is attached to?
PeaShooter_OMO replied to PeaShooter_OMO's topic in Network, Cloud and Web
@Kas Ob. If you look at the replies of that Gitter post you will see that the issue is actually not SSL/TLS. I did submit a demo app and code to that Gitter post which demonstrates the issue. -
Can a Send be done outside the thread a TWSocket is attached to?
PeaShooter_OMO replied to PeaShooter_OMO's topic in Network, Cloud and Web
Indeed I understand that even though connections are separated by means of sockets one would still be able to look at the incoming data across them as sort of "sequential" in nature and I assume in general one would be able to process that data similarly but these servers don't just do that the whole day. They also look at other processes which also include FTP and disk access along with DB access and then need to create new data and send it between them whenever required. The whole cycle is a bit time critical and in the very least I would expect the listening Server side to be in its own thread and perhaps hand off some major work to another thread, even socket access. Obviously Indy's server side does the thread per connection automatically and I might well be overthinking this when looking at ICS but the question I asked above about Sending from another thread was the very first thing I was thinking about. You see, I created a re-usable TCP framework which is used in different projects at our company including the above Server service and I want to adopt an approach that can be used in general by most if not all those projects. I also need my applications to be able to send network data to the other side at any point and from any thread. If ICS does not work well with that any thread sending then sure, I could transfer the data to be sent to the thread owning the socket. No problem. Now that I think of it, I wonder if that is not perhaps the reason for my issue with the current Indy implementation.... maybe Indy also does not like that I do that. Maybe @Remy Lebeau would be able to provide some insight regarding that. My research is to find solutions which I might have to consider in future. -
Can a Send be done outside the thread a TWSocket is attached to?
PeaShooter_OMO replied to PeaShooter_OMO's topic in Network, Cloud and Web
It is the post on the Indy Gitter Chat Room which you are currently looking at. I am researching other libraries while that one simmers in the background. My time might just run out and I need to be prepared. The post on Gitter -
Can a Send be done outside the thread a TWSocket is attached to?
PeaShooter_OMO posted a topic in Network, Cloud and Web
Good day I have a server service which I originally created using Indy. I am now stuck with an issue which I am struggling to resolve. We have a deadline and that server service needs to be rolled out so I decided that while my Indy issue is being looked at I will see what alternatives are available and how they perform. The server I developed can sometimes accept hundreds of connections in a minute and files are exchanged between the server and the clients. There also exist occasions where another of the same server type will connect to this one and hundreds or even sometimes thousands of files maybe interchanged between them in a single session. I believe threads are crucial in such a situation and I was wondering how ICS will be able to perform in this sutation and aspecially with threads. I have read posts and comments about the differences between Indy and ICS. For example in this one long ago, ICS: Thread or not and in this one, ICS or Indy for a new project Francois notes that the developer has the freedom to use threads with ICS if he pleases and from what I have seen ICS has made provisions for the use of threads. But this post Stable Communication between ICS TSslWSocket and TSslWSocketServer and aspecially this comment from Angus (Comment) made me wonder whether threads are even a good idea with ICS. I will agree that that post's original developer's situtaion might not be known well enough to be able to make the assumption that threads are not a good way to work with ICS so I will rather ask and find out. Assuming threading is done correctly and also apart from the usual comment of "Most of the time you don't need threads in ICS, look how nicely my stuff works without it" and of course Angus' comment I would like to ask; Honestly now, can ICS work as expected within a multi-threaded environment closely built around ICS's framework? Second question... Can you use the Send method of ICS's Socket component from outside the original thread that the component was attached to without it bombing out somewhere down the line. In other words is it thread-safe to do so? Thank you for your input. -
Preventing and allowing things to happen in a Thread???
PeaShooter_OMO replied to Ian Branch's topic in General Help
-- -
Delphi 12 Component Palette Panel Shift Issue
PeaShooter_OMO replied to Shrinavat's topic in Delphi IDE and APIs
Do you have different Desktops setup? I have and I have found that sometimes my Object Inspector's Column (SplitPos) width changes because of the switching between the Debug Layout and my own custom desktop when I "Run" a program. The .DST files stijnsanders referred to in "c:\Users\<user>\AppData\Roaming\Embarcadero\BDS\22.0\" contains the layout of the desktops (adjust version number of folder as needed). The default ones as well as custom ones. I then go into each of them and make sure the relevant properties of the Object Inspector is set the same across all the .DST files uncluding the Debug Layout. I suggest that you look to see to if the Component Palette has properties in those files and set them the same across the board. Make sure to consider all relevant properties. This approach works for me for the Object Inspector but your situation might differ. -
Delphi 12 Component Palette Panel Shift Issue
PeaShooter_OMO replied to Shrinavat's topic in Delphi IDE and APIs
Please uninstall (not disable) CnPack temporarily and see if it still occurs