Jump to content

Search the Community

Showing results for tags 'delphi'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 69 results

  1. Some one is asking for my themes, so I thought its better to create a new post to benefit any one who like them, I called them "Nature" themes, one Nature original theme and one Nature Warm theme, you may use Delphi IDE theme editor (https://github.com/RRUZ/delphi-ide-theme-editor) to apply them: Please click Like if you enjoy it. Nature warm (based on my Nature original theme): File: c0d3r-YW-Nature-warm.theme.xml
  2. PrimeMinister

    Problem with clearing ADO Tables

    Hey guys, so I'm having a problem with my ADO Tables. I have a button in my program that is meant to clear all tables in the database related to the program when clicked but whenever I click it, it gives errors. (no matter how many times I change my code) Could it be a problem with my Data Module or what? (I'm not sure cause my button which saves stuff to the database, works perfectly without a hitch) How could I alleviate this? Code of my data module: const scConnectionString = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%pathtomdb%Racers.mdb;Mode=ReadWrite;Persist Security Info=False;'; var dmRacers: TdmRacers; implementation {%CLASSGROUP 'Vcl.Controls.TControl'} {$R *.dfm} procedure TdmRacers.DataModuleCreate(Sender: TObject); var path:string; begin path:=ExtractFilePath(ParamStr(0)); conToDB.ConnectionString := StringReplace(scConnectionString, '%pathtomdb%', path, []); conToDB.Connected:=True; tbl1660.Active := True; tblXKarts.Active := True; tblTwoPointOne.Active := True; tblMidB.Active := True; tblMidA.Active := True; tblLateModel.Active := True; tblSprints.Active := True; tblV8.Active := True; tblHeavyMetals.Active := True; tblHotrods.Active := True; tblPinkrods.Active := True; tblStockrods.Active := True; tblMinis.Active := True; tblDevelopment.Active := True; end; Code from the form: public { Public declarations } MyCmd:TADOCommand; procedure EmptyTable(tbl:TADOTable;tablename:string); procedure ResetActiveProp(tbl:TADOTable); end; var frmEntry: TfrmEntry; implementation {$R *.dfm} procedure TfrmEntry.ResetActiveProp(tbl: TADOTable); begin tbl.Active := True; end; procedure TfrmEntry.EmptyTable(tbl: TADOTable; tablename: string); var MyCmd: TADOCommand; begin tbl.Active := true; MyCmd.CommandText := 'Delete * from '+tablename; MyCmd.Execute; tbl.Active := false; end; procedure TfrmEntry.bmbClearClick(Sender: TObject); var i:integer; begin cbxGridSelect.ItemIndex:=-1; cbxGridSelect.Text:='Select a class'; edtRacerName.Clear; edtCarNumber.Clear; edtLicenseNum.Clear; i:=MessageDlg('Dialog cleared',mtInformation,[mbOK],0); end; procedure TfrmEntry.bmbClearDBClick(Sender: TObject); var i:integer; begin i:=MessageDlg('Are you sure you want to clear the Racers database? (all current data in the database will be lost.)',mtWarning,[mbOK,mbCancel],0); if i = mrOk then begin //clears entire database with dmRacers do begin EmptyTable(tbl1660,'tbl1660'); EmptyTable(tblXKarts,'tblXKarts'); EmptyTable(tblTwoPointOne,'tblTwoPointOnes'); EmptyTable(tblMidB,'tblMidB'); EmptyTable(tblMidA,'tblMidA'); EmptyTable(tblLateModel,'tblLateModels'); EmptyTable(tblSprints,'tblSprints'); EmptyTable(tblV8,'tblV8'); EmptyTable(tblHeavyMetals,'tblHeavyMetals'); EmptyTable(tblHotrods,'tblHotrods'); EmptyTable(tblPinkrods,'tblPinkrods'); EmptyTable(tblStockrods,'tblStockrods'); EmptyTable(tblMinis,'tblMinis'); EmptyTable(tblDevelopment,'tblDevelopment'); i:=MessageDlg('Database successfully cleared',mtInformation,[mbOk],0); //resets active property of tables ResetActiveProp(tbl1660); ResetActiveProp(tblXKarts); ResetActiveProp(tblTwoPointOne); ResetActiveProp(tblMidB); ResetActiveProp(tblMidA); ResetActiveProp(tblLateModel); ResetActiveProp(tblSprints); ResetActiveProp(tblV8); ResetActiveProp(tblHeavyMetals); ResetActiveProp(tblHotrods); ResetActiveProp(tblPinkrods); ResetActiveProp(tblStockrods); ResetActiveProp(tblMinis); ResetActiveProp(tblDevelopment); end; end else begin i:=MessageDlg('Clear aborted',mtInformation,[mbOk],0); end; end; Example of errors: Thanks in advance for the help! Kind Regards PrimeMinister
  3. Goal: I have configured my app to be opened by some links in iOS, like myapp://lala (using custom scheme), or https://myapp.com/c/lala using universal links, and is already opening my app, but i need to know which url that opened my app. (There is even a tutorial in FMX Express) Problem: I'm trying to handle incoming url from my ios app unsuccessfully. On iOS this should be done by capturing event TApplicationEvent.OpenURL like: procedure TipUrlHandler.ApplicationEventMessageHandler(const ASender: TObject; const AMessage: TMessage); begin case TApplicationEventData(TApplicationEventMessage(AMessage).Value).Event of TApplicationEvent.OpenUrl: HandleUrl(TiOSOpenApplicationContext(TApplicationEventData(TApplicationEventMessage(AMessage).Value).Context).URL); else end; end; Mas o TApplicationEvent.OpenUrl nunca é chamado. So I checked the class TApplicationDelegate in the unit FMX.Platform.iOS.pas in which the TApplicationDelegate.applicationOpenURLWithOptions function should be called every time the app is opened by a url as Apple documents: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623112-application?language=objc class function TApplicationDelegate.applicationOpenURLWithOptions(self: id; _cmd: SEL; application: PUIApplication; url: Pointer; options: PNSDictionary): Boolean; So I went to check if the applicationOpenURLWithOptions method is being added correctly in TApplicationDelegate.CreateDelegateMetaClass: class procedure TApplicationDelegate.CreateDelegateMetaClass; begin ... // Opening a URL-Specified Resource if TOSVersion.Major >= 9 then class_addMethod(DelegateClass, sel_getUid('application:openURL:options:'), @applicationOpenURLWithOptions, 'B@:@@@@') else ... end; And then I was able to prove it wrong! The number of arguments declared is wrong, as the correct one should be B@:@@@ Then I made the modification to FMX.Platform.iOS.pas, being as follows: class procedure TApplicationDelegate.CreateDelegateMetaClass; begin ... // Opening a URL-Specified Resource if TOSVersion.Major >= 9 then class_addMethod(DelegateClass, sel_getUid('application:openURL:options:'), @applicationOpenURLWithOptions, 'B@:@@@') else ... end; But the TApplicationDelegate.applicationOpenURLWithOptions function is not yet called. What is wrong? @EDIT Sorry! It is working for custom schemes like "myapp://lala" (with or without the correction in FMX.Platform.iOS.pas) but it is not working for universal links like https://myapp.com/c/lalala. Although I have already configured the universal link correctly and when I click on this universal link, the iOS open my app, but the url can't be handle with TApplicationEvent.OpenUrl, but I discovered that the handling of incoming url of a universal link is different: Handling Universal Links
  4. DieselDave

    Compiler Error E2217

    Is anyone having problems with Delphi 10.3.3 - getting compiler error messages E2217 : Published field not class or interface type. It occurs against the first (and every subsequent field) in the first class definition in a unit ? This has compiled ok before but now it is driving me mad - any Suggestion as to what is wrong would be welcomed. Dave M
  5. Hello, I get a problem with running RestDebugger on my Windows 10 after it was updated. I get such error: and its stops (not working) It's weird and its on all version I have on my installed from Delphi XE8 to 10.4 . I also download free RestDebugger (tool from embarcadero web page and I get error too but it's bit different) Windows 10 Pro version: 20H2 compilation: 19042.746 Can someone confirm or know solution ? best regards Moskw@
  6. Get the most out of your GPU by writing custom shaders for FireMonkey! https://blog.grijjy.com/2021/01/14/shader-programming/
  7. Check out some of the interesting algorithms and data structures used to create an extremely light-weight XML DOM. https://blog.grijjy.com/2020/10/07/an-xml-dom-with-just-8-bytes-per-node/
  8. Hi all, I'm trying to de-couple the actions lists, with related actions, from a specific form to a data module. These actions will be used so also in other views without duplicate them in every form. The things work BUT they are not cyclic updated. The OnActionUpdate is called only when I click on the assigned graphic button (for example), but I would like that ActionXXX.Enabled si cyclically called as when they are in a form. Some ideas? Best Regards Silverio
  9. Hello people, my name is Edisson Savio and I am interested in implementing DLL libraries in my code. I work with simulation of numerical methods applied to reentry physical problems. I have implemented my actual code in PASCAL language using Class variables as start point. I have sucess in such implementation. Now, I am interested in using DLL libraries and after a research in this topic, my unique idea was based on the work of Marco Cantù in "Bible Delphi 3" and I have implemented in such way. I have created the base unit and the implementation unity, as well as the DLL routine. When I put this one to run, my code doesn´t execute the first implementated routine. I would like to know if there is someone who can help me in this task? I wait for your help, best regards, Edisson Sávio.
  10. shineworld

    FormDestory call order

    Hi all, I'm moving a big project, about 1.500.000 code lines from Delphi 2006 to Syndey, but I'm in trouble with how Syndey destroys objects in program termination. Sample: A very Dummy application with 1 form without any other code than a comment in TForm3.FormDestory to place a breakpoint: unit Unit3; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs; type TForm3 = class(TForm) procedure FormDestroy(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form3: TForm3; implementation {$R *.dfm} procedure TForm3.FormDestroy(Sender: TObject); begin // < placed breakpoint here!!! // end; end. A very simple project with a string assignment to catch the main flow (in S := ''; ) after Application Run: program Project2; uses Vcl.Forms, Unit3 in 'Unit3.pas' {Form3}; {$R *.res} var S: string; begin S := 'asdfasdf'; Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm3, Form3); Application.Run; S := ''; ; << placed break point here end. In BDS 2006 if I run this code and exit program first break at Form3.FormDestroy, then breaks in main at S := ''. RIGHT ! In Sydney first, break in the main at S := '', then goes to Form3.FormDestry. What has changed so much the Delphi behavior? if I add a Form3.DoubleClick event with Application.Terminate I got also an environment error: [50164E97]{rtl270.bpl } System.Classes.TList.Get (Line 4972, "System.Classes.pas" + 2) + $A [50EBFC4B]{vcl270.bpl } Vcl.AppEvnts.TMultiCaster.GetAppEvents (Line 657, "Vcl.AppEvnts.pas" + 1) + $B [50EBF60E]{vcl270.bpl } Vcl.AppEvnts.TMultiCaster.DoActivate (Line 425, "Vcl.AppEvnts.pas" + 5) + $9 [50E5A73F]{vcl270.bpl } Vcl.Forms.TApplication.WndProc (Line 10617, "Vcl.Forms.pas" + 126) + $C [50181450]{rtl270.bpl } System.Classes.StdWndProc (Line 18021, "System.Classes.pas" + 😎 + $0 [50E5B23F]{vcl270.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 11028, "Vcl.Forms.pas" + 23) + $1 [50E5B282]{vcl270.bpl } Vcl.Forms.TApplication.HandleMessage (Line 11058, "Vcl.Forms.pas" + 1) + $4 [50E5B5B5]{vcl270.bpl } Vcl.Forms.TApplication.Run (Line 11196, "Vcl.Forms.pas" + 26) + $3 [0051E178]{bds.exe } bds.bds (Line 222, "" + 13) + $2 😞 test.7z
  11. Meu nome é Edisson Sávio e eu estou implementando um código em PASCAL pelo Delphi 10.4 da Embarcadero. O meu código é para simulação de problemas físicos de reentrada. Já implementei o código usando o PASCAL avançado do Delphi, estou agora querendo implementar ele usando a ideia de bibliotecas DLL do delphi. Eu li na Bíblia Delphi 3 sua sugestão para implementar DLL's com a criação de duas unities: a unit base e a de implementação mais o código da DLL para chamar as rotinas da implementação. Eu tentei rodar um caso básico e deu erro de "Acess Violation". Eu gostaria de saber se você pode dar dicas de onde eu encontraria este tipo de erro? O problema não me parece ser memória pois eu já testei aumenta-la. Eu fico aguardando seu retorno, obrigado, Edisson Sávio.
  12. Hello, We are looking for a Delphi Object Pascal Developer. Our system is entirely based on it, and some updates are needed. We are located in Morocco but remote work is an option. (Long term project). Please respond if interested.
  13. JDS2018

    Year Countsdown

    Hi Can Someone help me on below i need to make app count down for 1 Year Let Say if i set Date for 2021 Dec 31 need to see to the Set Date How Many Year , months , Days , Hours , Mints, Seconds Left
  14. Alexandre Pires

    How to read a table every x time.

    Hi Guys, I need my Android background service to read a table from my database every 30 seconds. What would be the best way to do this? I am currently using an infinite loop in a thread and sleep, but I believe it is not the best approach. @Dave Nottage Is there any kastri component that helps to do this? I am using Delphi 10.3 Thanks for some help Alexandre
  15. The IDE compiles my project, then I try to run the project.exe from the IDE and I got the following messages: But if run the compiled project.exe without the IDE in the explorer, it works What could be the problem in the IDE? I already reinstalled Delphi, but still not working. I checked the files in my directory and they are there, also checked the environment variables but everything seems fine
  16. How to delete all the files just in case you need to for some unknown reason. Manual uninstall of RAD Studio/Delphi/C++Builder 10.4 Sydney Launch the License Manager from the bin folder (by default “C:\Program Files (x86)\Embarcadero\Studio\21.0\bin\LicenseManager.exe”) and delete any trial or beta (Test Field) license that you can find. Check it under “License Details” in the center column. Under your Control Panel’s Program and Features Add/Remove Program uninstall the following entries: RAD Studio 10.4 version 21.0 Please follow these instructions to remove any leftover files: If Windows 32-bit, remove the C:\Program Files\Embarcadero\Studio\21.0 directory (or the custom folder you had used). If Windows 64-bit, remove the C:\Program Files (x86)\Embarcadero\Studio\21.0 directory (or the custom folder you had used). Remove the C:\Users\Public\Documents\Embarcadero\Studio\21.0 directory Remove the C:\ProgramData\Embarcadero\Studio\21.0 directory. Remove the %APPDATA%\Embarcadero\BDS\21.0 directory. Remove the HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\21.0 registry key If Windows 32-bit, remove the HKEY_LOCAL_MACHINE\SOFTWARE\Embarcadero\BDS\21.0 registry key If Windows 64-bit, remove the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Embarcadero\BDS\21.0 If Windows 32-bit, remove the following files from C:\Windows\System32\: BDEAdmin.* CC32*.DLL Midas.* Xerces*.DLL If Windows 64-bit, remove the following files from C:\Windows\SysWOW64\: BDEAdmin.* CC32*.DLL Midas.* Xerces*.DLL Field testers should also do the following (and others may want to as well): Delete the Godzilla license from License manager before uninstalling it or during the installation of RAD Studio 10.4 If you had problems in the second step (uninstalling from Windows Control Panel), try this Microsoft tool to solve uninstallation problems: http://go.microsoft.com/?linkid=9779673
  17. After searching the internet a lot i've decided to create a new unit to be able to assign multiple afterscroll or afteropen events to one component ... very simple in runtime. Informations on https://www.delphipraxis.net/143341-event-multicast-problem-howto-sender-methodname.html helped me to create a basic unit. Pls check it at https://github.com/MicrotronX/Multicast-Events I know, there must be something better out there ... but for me this works very good ... PS: I cannot guarantee that the source code is free of bugs! Example-Usage in a tDataset descant: unit myMulticastEventDatasetUnit; interface uses System.Classes, Data.DB, mxEventsUnit; type tmyMulticastEventDataset=class(tDataset) private function fmxevents_get:tmxevents; public fmxEvents:TmxEvents; constructor Create(AOwner:TComponent); override; destructor Destroy; override; published property mxEvents:TmxEvents read fmxevents_get; end; implementation constructor tmyMulticastEventDataset.Create(AOwner: TComponent); begin inherited; fmxEvents:=nil; end; destructor tmyMulticastEventDataset.Destroy; begin if assigned(fmxEvents) then fmxEvents.free; fmxEvents:=nil; inherited; end; function tmyMulticastEventDataset.fmxevents_get: tmxevents; begin // we Create the tmxEvents only if there is a need if not assigned(fmxevents) then begin fmxEvents:=tmxEvents.create(self); end; result:=fmxevents; end; end. If someone knows a way to inject this into tDataset itself, you're free to change the code! Declarations for Examples: myDS:tmyMulticastEventDataset; procedure FirstAfterScrollEvent(vDataset:tDataset); procedure SecondAfterScrollEvent(vDataset:tDataset); Example-Usage for registering a AfterScroll Event: myDS.mxEvents.Event('AfterScroll').AddDatasetNotifyEvent('uniquenameforevent1', FirstAfterScrollEvent) ; myDS.mxEvents.Event('AfterScroll').AddDatasetNotifyEvent('uniquenameforevent2', SecondAfterScrollEvent) ; Example-usage for disabling a already registered AfterScroll Event: myMCDS1.mxEvents.Event('AfterScroll').Disable('uniquenameforevent1') ; myMCDS1.mxEvents.Event('AfterScroll').Disable('uniquenameforevent2') ;
  18. Hi all, I just wanted to let you know my (long-awaited) FMX book is now available (actually it is rolling out on Packt and Amazon so availability may be different across different countries). If you like to read some details you can read my latest blog post: https://blog.andreamagni.eu/2020/10/book-delphi-gui-programming-with-firemonkey-now-available/ I really hope the book will be useful to spread Delphi and FMX as development platform. Thanks for the attention, Andrea
  19. is it possible to tweek the GExpert tool to search in the background for all function/procedure references and paint the result count on the source editor window like the attached picture? the Grep search feature now works great and it already has the functionality to jump to other files. so my proposition is to make the Grep search for all functions/procedure references that are found on the project path and lib path and the standard paths. then paint the count like visual studio is doing. and when the user clicks on the count the grep window is shown, and in future iteration it can be enhanced to show the implementation where the reference directly. This is just an idea that I had after spending an hour to locate all the references of a function in a large project.
  20. Dear visitors, I like to notify you that new version of NextSuite (VCL) is released. NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component.  and many more.  Now we also offer 25% discount for visitors of this website. Use DELPHIPRAXIS coupon code when ordering. Few screenshots:      Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip  Please read more at: http://www.bergsoft.net/en-us/article/09-05-20  Website: www.bergsoft.net
  21. Hi there. XCode 12 has been looming in the AppStore for roughly a week now. Has anyone gotten over themselves and installed it? If so, what did Delphi have to say?
  22. Hello I am getting this error when doing a GET in a url. "404 Connection aborted on request" or this mistake access violation in delphi xe2 This is my code in the button var data: String; HttpClient: TSslHttpCli; xmlDoc: TXMLDocument; dataStream: TMemoryStream; begin mResult.Lines.Clear; xmlDoc := TXMLDocument.Create(Self); HttpClient := TSslHttpCli.Create(nil); HttpClient.ContentTypePost := 'text/xml'; HttpClient.URL:= 'https://www.poemist.com/api/v1/randompoems'; HttpClient.RcvdStream := TStringStream.Create(''); try try ShowMessage(IntToStr(HttpClient.StatusCode)); //HttpClient.GetASync; HttpClient.Get; ShowMessage('-3-1-'); { SslHttpCli.SendStream := dataStream; SslHttpCli.SendStream.Write(Data[1], Length(Data)) ; SslHttpCli.SendStream.Seek(0,0); mResult.Lines.LoadFromStream(dataStream); } // xmlDoc.LoadFromStream(HttpClient.RcvdStream); // xmlDoc.Active := True; dataStream.LoadFromStream(SslHttpCli.RcvdStream); mResult.Lines.LoadFromStream(dataStream); // mResult.Lines.LoadFromStream(HttpClient.RcvdStream); Except raise; end; finally HttpClient.Free; xmlDoc.Free; end;
  23. I am writing up a program to allow users to update/add to registry entries. the registry is for ABC_Auto_File and has different options not just open... I have it up and working but am curious of a better way to parse the info in the registry string. examples of the string in question are: "c:\my folder\myapp.exe" -c "c:\my folder2\myconfigfile" "%1" c:\folder\myapp -c c:\folder2\myconfigfile %1 c:\folder\myapp %1 the -C is there 99.99% of the time but sometimes users have it working without it. but i will be add it in when updating the registry. like wipe and rewrite. myapp is consistent but may include the .exe. current i am removing all the " and %1 the look for the -c anything prior is a string value i want and anything to the right is a sting value i want. i am currently using the copy/pos commands to get that info but am ALWAYS curious if someone has better option for parsing.
  24. Hallo to all, since 10.4 (and 10.4.1) debugging c++ DLL for x64 Windows S.O. is impossible (for me of course). ALL THE PROJECTS ARE COMPILED FOR X64. If I launch standard debug from Delphi project, the DLL source code (made in c++) is ignored and no breakpoints are used in the DLL. If I launch LLDB debug from c++ DLL (setting the correct host of course), an error like this is generated and the app doesn't start. If you launch the app with or without Delphi debugger all is working. Same situation with remote debugger (via "old style debugger" or paserver). Before LLVM all is working and i can debug DLL c++ code. I miss something or do something wrong ? Attached is a very simple project group to test. Thanks for your attention. Test.zip
  25. Maybe a stupid question but not for me at the moment. Need a way to draw rectangles on a canvas and then to make it possible to resize, move, delete or clone. That is needed to automate some process of segmentation objects (same kind of objects by rectangles with same aspect ratio) on a bunch of images (>100K). For now I can draw rectagles on a TImage canvas wthout any questions. But can't figure out how to select that rectangle with mouse, resize it, scale it and move. Or maybe should I look at shapes?
×