Jump to content

SwiftExpat

Members
  • Content Count

    222
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by SwiftExpat

  1. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    You show 2 instances of the IDE @ 28% cpu usage with only .2mb of memory. The executable is not even loaded into memory at that point, it seems like there are not enough resources. Is this a VM or physical machine? How old is the machine?
  2. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    I added my vote, a direct solution would be the best. I doubt this will get much traction, I see you waiting since 10.3. As a workaround, what does GExperts not solve? (it is not the cleanest, but add some requirements and at least someone can evaluate it for a expert) Identify second instance - Solved, you have the screen above Close second instance - easy, just get the PID of ide and kill it / close it switch to first? - is this really necessary?
  3. I would have spent the next week debugging those 200 lines and reading documentation, and probably still not have been happy with the result. Still good explanation on your part and you at least make it seem easy enough to try.
  4. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    Cry because both instances have the same source open and edits overwrite each other? Maybe we can dry those tears, but let's understand the problem. I love that proven procedure above, rest assured we all have our proven procedures with the IDE 🙂
  5. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    You could write your own expert and install it in the IDE. Nothing native that I am aware of. What functionality are you looking for from TJvAppInstance? What is the workflow you are expecting when you accidently click twice?
  6. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    A simple solution would be to load GExperts, it already has a check on IDE start that would catch that.
  7. SwiftExpat

    Prevent Delphi IDE Multiple Instance

    Multiple instances of the same version or multiple versions? What is causing multiple instances to run?
  8. SwiftExpat

    MessageBox is hidden by a modal form

    You could follow the example included with Delphi, %samples%\Object Pascal\RTL\Parallel Library . It is a good example of a thread updating the UI and when to call synchronize. Parallel for is covered in the example. Review / debug / step through that and you will know where to focus your reading and searches.
  9. Literally it is Framework Neutral Components. When you install FNC components, they are available for VCL and FMX. Both frameworks are covered under the same license. It is all Delphi code, so not really any baggage. In the source code it is a series of IfDef that adjusts for VCL or FMX. Likely the FNC version is a port of the vcl only component https://www.tmssoftware.com/site/diagram.asp FNC tends to be lighter on features, cheaper on the license. VCL and FNC are both actively developed at TMS. The idea is that you learn the component properties, which are the same across VCL, FMX, lazarus and Web, and the component works the same regardless of the framework.
  10. SwiftExpat

    NT API components

    Jedi might have what you need
  11. You might take a look at TMS, https://www.tmssoftware.com/site/tmsfncblox.asp
  12. I am signed up. Anything I can learn ( or hear out loud and realize that I actually understand the effect of the code I am writing ) is worth my time. This is a focused topic, I expect the content will be more focused than 'choosing the best ui framework for x' .
  13. SwiftExpat

    TDataModule OnDestroy event never triggered?

    OnSaveState did not fire when I tested 😞
  14. SwiftExpat

    Split String

    split the string based on the delimiter for the last string in the list, ('0011') convert to integer (11) and increment (12) convert the int back to a string ('12') compare the lengths and then loop to add in the padding zeros ('0012') concate the list back to 1 string
  15. SwiftExpat

    TDataModule OnDestroy event never triggered?

    Many of those lines are just there just to be able to place break points and verify what lines are actually executed (or not executed ) when the application terminates. Think of the situation where you need a child window, when that window is destroyed ( destroyed and closed are not the same ). In the parent window you would call free on the child window to have the destructor called.
  16. SwiftExpat

    TDataModule OnDestroy event never triggered?

    I thought about this one quite hard today, a bit of fun learning, and here is my suggestion. FMX has the following mapped: procedure TPlatformCocoa.Terminate; begin FRunning := False; FTerminating := True; TMessageManager.DefaultManager.SendMessage(nil, TApplicationTerminatingMessage.Create); NSApp.terminate(nil); end; So in my app I implemented it as this , similar to what they recommend for android. unit dmDestroyMe; interface uses System.SysUtils, System.Classes, System.Messaging; type TDestroyVersion = class public VersionString: string; constructor Create; destructor Destroy; override; end; TDestroyMeDM = class(TDataModule) procedure DataModuleCreate(Sender: TObject); procedure DataModuleDestroy(Sender: TObject); private FVersion1, FVersion2: TDestroyVersion; v1, v2: string; msgSubId: integer; procedure ApplicationTerminatingHandler(const Sender: TObject; const Msg: TMessage); public { Public declarations } end; var DestroyMeDM: TDestroyMeDM; implementation {%CLASSGROUP 'FMX.Controls.TControl'} {$R *.dfm} { TDestroyVersion } uses FMX.Forms; constructor TDestroyVersion.Create; begin VersionString := '1.2.3.4'; end; destructor TDestroyVersion.Destroy; begin VersionString := '0.0.0.0'; inherited; end; procedure TDestroyMeDM.ApplicationTerminatingHandler(const Sender: TObject; const Msg: TMessage); begin v1 := '0.0.1.0'; Fversion1.Free; v2 := '0.1.0.0'; end; procedure TDestroyMeDM.DataModuleCreate(Sender: TObject); begin v1 := '2.0.1.0'; v2 := '3.1.0.0'; FVersion1 := TDestroyVersion.Create; FVersion2 := TDestroyVersion.Create; msgSubId := TMessageManager.DefaultManager.SubscribeToMessage(TApplicationTerminatingMessage, ApplicationTerminatingHandler); end; procedure TDestroyMeDM.DataModuleDestroy(Sender: TObject); begin FVersion2.Free; TMessageManager.DefaultManager.Unsubscribe(TApplicationTerminatingMessage, msgSubId, true); end; end. I will keep looking for the QP issue, but honestly this is one they expect you to implement. I just did not have the experience when I saw this the first time around. DestroyMe.zip
  17. SwiftExpat

    TDataModule OnDestroy event never triggered?

    On MacOS the process is killed, so the app never gets to shutdown correctly. I opened a support ticket with Embarcadero and was not given a resolution to this. I ended up with a timer to save state every x seconds 😞 Maybe someone else has a better solution.
  18. SwiftExpat

    TDataModule OnDestroy event never triggered?

    2 basics that might help take this thread further. What platform are you debugging on? Just to be sure, are you compiling in Debug not Release?
  19. It is worth reporting in QP. As a work around you could create a link and then add that linked folder to the end of your search path. Creates a symbolic link. MKLINK [[/D] | [/H] | [/J]] Link Target /D Creates a directory symbolic link. Default is a file symbolic link. /H Creates a hard link instead of a symbolic link. /J Creates a Directory Junction. Link Specifies the new symbolic link name. Target Specifies the path (relative or absolute) that the new link refers to.
  20. SwiftExpat

    Android: Opening files in external application

    Mustafa, Great job putting together that readme for your github repo. I like the inline samples and android version cross references.
  21. SwiftExpat

    Windows APIs?

    https://docs.microsoft.com/en-us/windows/win32/api/_wua/ You should almost be able to follow this C# example https://stackoverflow.com/questions/64203306/c-sharp-get-pending-windows-updates-updates-that-cant-be-found Also you might prototype it in powershell just to make sure you are getting the results you want before you spend time writing Delphi code. here is almost a step by step https://mcpmag.com/articles/2016/06/23/finding-pending-updates.aspx
  22. You can also get the line size with sysinternals coreinfo, output looks like this: Logical Processor to Cache Map: **---------- Data Cache 0, Level 1, 32 KB, Assoc 8, LineSize 64 **---------- Instruction Cache 0, Level 1, 32 KB, Assoc 8, LineSize 64 **---------- Unified Cache 0, Level 2, 512 KB, Assoc 8, LineSize 64 ************ Unified Cache 1, Level 3, 32 MB, Assoc 16, LineSize 64 --**-------- Data Cache 1, Level 1, 32 KB, Assoc 8, LineSize 64 --**-------- Instruction Cache 1, Level 1, 32 KB, Assoc 8, LineSize 64 --**-------- Unified Cache 2, Level 2, 512 KB, Assoc 8, LineSize 64
  23. SwiftExpat

    F2084 Internal Error: D33566

    If that happens consistently, then you might be able to trace the last unit compiled using sysinternals process monitor. Having that might help you work backwards into a "reproduce failure package". You would have to judge if that activity is worth the effort, and i honestly do not know if it will fix anything for you. I always disable Enable Unit Directory Cache under Computer\HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\22.0\Compiling
  24. The client only knows / reacts to what it sends receives, so it could stay established. Sending keep alives is still a possible strategy. You can still have a timer on a router expire and the router will not send anything to the client(s). at that point it should be a re-transmit. It is still worth asking your network guys to understand if there is anything in the middle. Especially a load balancer in front of that HTTP server.
  25. SwiftExpat

    New Delphi job opportunity

    They are not even planning on having full time trained staff. An MBA will tell you something like, "IT should be 1% of budget". The employer believes (plans) they have 2 options, outsource the project at a fixed price (which is never really fixed) or hire 3-4 low cost developers. The last developers I worked with in Brazil explained the situation, school is on the first floors of a tall building. Floors 7-8 were for our company, and our competition had floors 11&12. So when they go down for coffee at street level they are recruited, for a small pay increase, so naturally you they jump after 6 months. I don't blame them, it is better pay. School is also heavily sponsored by Microsoft and Oracle, so no surprise what they were trained in. The contract negotiators go in a room and promise to provide a complete solution and a fully trained staff at a fixed cost (except travel expenses and ...). And they substitute players whenever they feel like it (see the above, just a different angle). So no it does not compute. If you are the full time company employee, you will be looking for that career change. The circle just continues.
×