Jump to content

aehimself

Members
  • Content Count

    1069
  • Joined

  • Last visited

  • Days Won

    23

aehimself last won the day on June 10 2024

aehimself had the most liked content!

Community Reputation

402 Excellent

2 Followers

Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. aehimself

    Alternatives for SQL Anywhere

    I personally used MySQL for my projects and a bit of MsSQL server. I advise against FireBird and Oracle, my personal experience shows you'll have extra issues to keep an eye on. On Windows servers my suggestion is MsSQL, on Linux MariaDB. That way updates / patches are included in the regular process.
  2. Unfortunately that is true. If the old version running, it will stay that way until it is closed. At least you can make sure that the new instances are the updated version :)
  3. I'm not sure because we are talking about a network share, but renaming the file and placing the new .exe (with the same name) might still work. A lot of us use this technique in updating our applications.
  4. With this I completely agree. Meaningful attacks (and their mitigation) are out of the scope of this project however (especially if we are somewhat "controlling" endpoints) we should do our part in cybersecurity :)
  5. Include some security. The first glance there's nothing stopping me from shutting down all your programs if I get into your network. Are you sure you need to keep a TCP connection up with each agent? UDP would be a lot more practical, plus you could do the discovery with a simple broadcasted message.
  6. The only benefit I see here is the usage of data aware controls. A Dataset descendant is never going to be as efficient in storage or manipulation as arrays are. Also keep in mind that you are doubling the resources used every time you are cloning a Dataset, which - by your own words - is already pretty large. To simplify/standardize I would create my custom data storage class with thread safe access and then look into DataBinding or writing my own helpers to display the data in this storage. If speed is not an issue you also can use an indexed TFileStream to cut back on memory requirements.
  7. aehimself

    Reduce exe weight : Link with runtime package

    I'd strongly advise against UPX especially in production executables. I had my fair share of after-the-last-moment struggle because of it
  8. aehimself

    Continually Losing Frames

    It's "normal". The same happens in my home project which has 10-ish frames only. At least the fix is easy 🙂
  9. aehimself

    Should I just dive in to GUI programs?

    Borland had a pascal "IDE" and compiler called Turbo Pascal - with that you could only develop console applications - as there was no Windows at that time yet. Delphi was born in reaction to this, this was it's magic as you could target the brand-new shiny platform. Delphi is and was always designed in the RAD fashion: events firing here and there and you react to these events - let it be a click of a button or the closing of a form. My opinion is this is why books start off with GUI applications. If you have an amphibious car, you'll mainly show it off on water as every other car can drive on the road already. An other thing is if you code in the RAD way you only have to write and maintain only a small portion of code as the majority is handled by the framework. You'll also have more sense of success (and therefore the will to continue to learn) as you can recreate a fully functional notepad clone with 10 lines of written code. These are just my 2 cents though but based on these it makes sense to introduce Delphi this way. And if this was (at least the part of) the reason I'd also advise to start this way. Throw some controls on the form, make them do something you fancy. With time, you'll eventually meet the necessity to separate UI and business logic but when you reach that point you probably will have enough expertise to create the backend.
  10. aehimself

    Should I just dive in to GUI programs?

    You can add a message pump to any thread, VCL or not. If you need window messages, you can call AllocHwnd. Just because we are talking about console it doesn't mean these things do not work.
  11. aehimself

    Component property disappears from DFM

    Long story short, the issue was in the custom component itself. Someone wanted to have a constant OnDataChange code to run every single time and - as TDataSource is an INSANELY bad component with no overridable methods whatsoever - this is how they solved it: TCustomDataSource = class(TDataSource) protected procedure Loaded; override; private FOnDataChangeDesigned: TDataChangeEvent; end; procedure TCustomDataSource.Loaded; begin inherited; FOnDataChangeDesigned := OnDataChange; OnDataChange := DataChangeDef; end; In the moment the component was successfully streamed (run- or design time) the event handler was "saved" and reset, only to be called from the internal method. But since it's a private method the Object Inspector could not access it, therefore clearing the event handler alltogether. Saving only wrote this inconsistent state back to the disk. And yes, it seems all of the TCustomDataSources were affected, the event handler just disappeared so long ago that noone seemed to realize it. After fixing it and relinking all DataChange events found in the entire application... it seems to be working properly now.
  12. aehimself

    Component property disappears from DFM

    The datasource is on the last frame not on an ascendant (object dtsMyDTS instead of inherited dtsMyDTS). Inheritance only plays a role here if Delphi bugs out due to the long frame chain I think.
  13. aehimself

    Component property disappears from DFM

    By the first look... nothing seems different, that's my issue. The create order is an excellent idea, I'll doublecheck that tomorrow!
  14. aehimself

    Component property disappears from DFM

    Unfortunately I do not remember the 10.4 era, but this definitely happened under Delphi 11.2 and now Delphi 12. The project (and probably this frame) originally was created with Delphi 7 but was slowly upgraded to the most recent version. The source of said component is in Browsing path, Library path points to the precompiled DCU. All frame files (including the first one inherited from TFrame) is a part of the project. We have ~1500 frames with at least 20-50 of these custom datasources on each and this problem only occures on one frame, two datasources (always the same 2). This makes me believe that fixing it won't be something generic - e.g. on component or project level.
  15. aehimself

    Component property disappears from DFM

    Hello all, I have an issue with some of our components in the application we support where an event handler simply disappears (gets unlinked, code stays in .pas) when a frame is opened. The main container is a frame which is the 3rd or 4th descendant of a simple TFrame (with 2-3 levels of visual inheritance included). The event handler is the OnDataChange event of a custom TDataSource descendant component. This frame has ~50 of these datasources, but only 2 are affected. No other datasources / frames have the same issue (which we have hundreds, if not thousands). When you open the file in Delphi, the tab indicator already shows that it is modified and can be saved. Upon saving the event handler is simply unlinked, leaving the actual code in the .pas file. Restoration is easy, just double-click the handler in object inspector so it gets linked back which you can save perfectly... until next time someone forgets to check the modifications and roll back the removals; which already happened at least 5 times in the past half a year. inherited frmCustom: TfrmCustom [...] object dtsMyDTS: TCustomDataSource [...] OnDataChange = dtsMyDTSDataChange <-- this line disappears [...] end [...] end I bet it will be some rare edge case but it already caused lots of headaches and it would be a blessing if it could be fixed. I am not able to share the sources as they are proprietary plus you'd need the whole custom component package as well to be able to open it 🙂 I'm simply looking for indicators, what I can try, what I can check to find the root cause. Anyone saw something like this? Cheers!
×