

PeaShooter_OMO
Members-
Content Count
134 -
Joined
-
Last visited
Everything posted by PeaShooter_OMO
-
Error when installing custom package - Module not found
PeaShooter_OMO replied to JKNew's topic in Delphi IDE and APIs
What are the output directories for that package? There is an answer on Stack Overflow that I believe is a good way of looking at the problem: Can't load package %s error while installing a package It basically employs SysInternal's Process Monitor to see where the IDE is looking for that package. This gives you an idea of of where the IDE thinks the package should be compared to where you are actually putting it. -
Whatever you are looking for you will probably find by searching for Javascript examples
-
This should give you an idea type TForm3 = class(TForm) EdgeBrowser: TEdgeBrowser; Button1: TButton; procedure Button1Click(Sender: TObject); procedure EdgeBrowserWebMessageReceived(Sender: TCustomEdgeBrowser; Args: TWebMessageReceivedEventArgs); procedure EdgeBrowserNavigationCompleted(Sender: TCustomEdgeBrowser; IsSuccess: Boolean; WebErrorStatus: TOleEnum); private public end; var Form3: TForm3; implementation {$R *.dfm} procedure TForm3.Button1Click(Sender: TObject); begin EdgeBrowser.Navigate('https://www.google.com'); end; procedure TForm3.EdgeBrowserNavigationCompleted(Sender: TCustomEdgeBrowser; IsSuccess: Boolean; WebErrorStatus: TOleEnum); begin EdgeBrowser.ExecuteScript('window.addEventListener("click",function(e) {' + ' e = e || window.event;' + ' var target = e.target || e.srcElement;' + ' var text = target.textContent || target.innerText;' + ' window.chrome.webview.postMessage(target.outerHTML);' + ' }, false);'); end; procedure TForm3.EdgeBrowserWebMessageReceived(Sender: TCustomEdgeBrowser; Args: TWebMessageReceivedEventArgs); var LMsg : PWideChar; begin Args.ArgsInterface.TryGetWebMessageAsString(LMsg); ShowMessage(LMsg); end;
-
As a messagebox or as the only content of the EdgeBrowser by removing the rest?
-
It is possible to detect user clicks via a combination of the TEdgeBrowser's OnWebMessageReceived event and its ExecuteScript method along with Javascript but because of your last sentence I am unsure of what you actually want and for that one FPiette's suggestion is good.
-
How would copy and paste work? I suppose it would only copy the selected text but how would it look like after pasting? Space separated?
-
Why is it difficult to implement? Or shall I rather say; what about it makes it difficult to implement?
-
How can I force a record to be allocated on the heap ?
PeaShooter_OMO replied to dormky's topic in Algorithms, Data Structures and Class Design
Pointers should not be avoided and I highly suggest programmers should learn to use them properly and embrace them. They can make life so much easier. -
At home I am still on a very old version of Delphi. I hardly ever make money from Delphi privately and most utilities I create I give out for free to those I create it for. My best friend does make some money but not even enough to surpass the limitation of CE. He also is still on an old version of Delphi. There are only two reasons why I have not gone over to the CE and I reckon many might see them as lame reasons; 1. The limited Source Code. I constantly go into the source code to see what is being done and I alwys go into the source code the moment I come across some strange behaviour in my applications that I do not have an explanation for. I want access to source code. 2. The irritating thing of having to reinstall CE after a year and being forced to use the latest CE to do that with. Like most will testify to, reinstalling is a pain. I created a custom installer for my Delphi installation. It installs Delphi, copies all required 3rd party libraries and sets up multiple registry entries. So I just run it and sit back and as soon as it is finished I am ready to go without having to do any additional setup. It makes my life so easy but it is linked to the version of Delphi it is installing. Yes, I know its a lame excuse. But apart from that I believe CE to be quite valuable. Considering that we are part of an ecosystem that uses an IDE that by reason of its smaller community is being forced to be charged for to keep existing I would say that CE will help a lot. I have to pay for my lunch and I do not blame others that have to make a living too. Anybody that uses Delphi and complains about the price of it and at the same time complains about CE needs to remember that free hardly ever is completely free and time is money and quality takes time. That person would probably not use Delphi if they believed other IDEs/tools to be better in anyway so if you like it pay for it or use CE. We all know the issues with the versions we have and we all know it is expensive but most of us like using Delphi ( I assume) and I surely do not wan't to use another tool.
-
Ugrading Indy on Delphi 11. Error: F2051 Unit IdThread was compiled with a different version of IdGlobal.IdDisposeAndNil
PeaShooter_OMO posted a topic in Indy
I removed the standard Indy from Delphi 11. I used the Clean_Alexandria.cmd batch file and also went through all files and folders on my PC to remove any Indy*.bpl, dclIndy*.bpl, Id*.dcu, Id*.pas files that may exist. I removed all previous Library and Browsing Paths. I then downloaded Indy from the Git repository (Commit: b994412). I opened the project group for Delphi 11 (280) and changed each package's "Unit Output Directory" to (one for each, related to its functionality - System, Core, Protocols): ..\..\..\Delphi 11\DCU\System\$(Platform)\$(Config) or ..\..\..\Delphi 11\DCU\Core\$(Platform)\$(Config) or ..\..\..\Delphi 11\DCU\Protocols\$(Platform)\$(Config) I made sure to enable "Explicit Rebuild" for all packages. I made sure the DPK files did not get corrupted and that they looked the same as the originals after changing project options. I did also try with the {$IMPLICITBUILD OFF} directive. I then built and added Library paths, Browsing Paths and Debug DCU paths for Win32 and Win64 to Delph Options: Debug DCU: c:\<..........>\Delphi 11\DCU\System\$(Platform)\Debug c:\<..........>\Delphi 11\DCU\Core\$(Platform)\Debug c:\<..........>\Delphi 11\DCU\Protocols\$(Platform)\Debug Library: c:\<..........>\Delphi 11\DCU\System\$(Platform)\Release c:\<..........>\Delphi 11\DCU\Core\$(Platform)\Release c:\<..........>\Delphi 11\DCU\Protocols\$(Platform)\Release Browsing: c:\<..........>\Source\System c:\<..........>\Source\Core c:\<..........>\Source\Protocols I obviously copied all *.pas and *.inc files to the related Source folders I added to Browsing paths. I also copied all the *.res files to the related DCU folders I outputted the units to just for incase. When I create a blank project and add a IdTCPServer to the form and run it works fine. The moment I enable "Use Debug .DCUs" and try to build it gives the F2051 error: [dcc32 Fatal Error] Project11.dpr(5): F2051 Unit IdThread was compiled with a different version of IdGlobal.IdDisposeAndNil I am sure I am missing something here. I have upgraded Indy many times before in Delphi XE3 but this one stumps me. -
Ugrading Indy on Delphi 11. Error: F2051 Unit IdThread was compiled with a different version of IdGlobal.IdDisposeAndNil
PeaShooter_OMO replied to PeaShooter_OMO's topic in Indy
Point #1 Before I started with the upgrade I seached for all Indy related files and and I searched all my drives. Before each Indy build I would also go and delete all DCUs, DCPs and BPLs. Point #2 You made me think about what was happening so this weekend I realized that because I use a Build Group and each project in the Project group first builds the Debug then the Release I realized that because after each build per $(Config) the DCPs and BPLs are replaced. I am not sure which carries the signatures for the units. So obviously what would happen is that for instance IndySystem's DEBUG gets build then its RELEASE. So when it is IndyCore's turn its DEBUG gets build but references IndySystem's RELEASE DCP/BPL. Thats when the problem starts. So now I first finish building all the DEBUGS for all the projects first then I build the RELEASES for them and it works perfectly. Thanks for your help and thanks for injecting some perspective here to guide me to the answer. -
@Dalija Prasnikar and @David Heffernan thank you for the answers.
-
Which route would you then go if you could/wanted to re-write?
-
@David Heffernan May I assume your company is also "stuck" with Delphi (not sure if that is the correct question, though). I always wondered which IDE you consider to be great and which one you would migrate to if you had to re-write your company's flagship software.
-
I like Jetbrains, at least for the little I worked on it. They are really pumping it. Do you have a project on it that is bigger than your largest Delphi project? For which language? If so, how does that IDE behave with that project?
-
Are BPLs and/or DCPs constructed based on which build config is selected? I have an issue where the outcome is different based on the build order of the Build Configs. In this case when I build Indy the order in which I build (Debug then Release or Release then Debug) it will affect where a a test project using Indy will fail; Release or Debug: Error F2051 - Compiled with different version of IdDisposeAndNil
-
Ugrading Indy on Delphi 11. Error: F2051 Unit IdThread was compiled with a different version of IdGlobal.IdDisposeAndNil
PeaShooter_OMO replied to PeaShooter_OMO's topic in Indy
Debug Builds then Release Builds If I build the Indy projects' Debug Builds first then the Release Builds then the test project will fail to build on its Debug Build with "Use Debug .DCUs" is enabled. Release Builds then Debug Builds If I build the Indy projects' Release Builds first then the Debug Builds then the test project will fail to build on its Release Build Inline Directive If I remove the inline directive from IdGlobal.IdDisposeAndNil then the test project will build and run successfully on both of its Debug and Release builds and also stepping into the code will work if "Use Debug .DCUs" is enabled. The inline directive is used in many places in the code and I do not want to remove them just to get this working. How can this be fixed then? Surely there is a way because the standard Indy that is shipped with Delphi works 100%. I cannot just go back to the standard Indy with Delphi because I need to check if a newer release of Indy has fixed certain bugs. -
What is the solution to this if one would like to keep LivePreview? Can the packages be rebuilt? (Happened to me on Delphi 11)
-
How to set event handler for generic TControl descendant using RTTI
PeaShooter_OMO replied to CoMPi74's topic in General Help
TMethod in System is a record with a Code and Data pointer. Would it be possible to browse Delphi's source code to find any source code to verify Event types' structure or is the knowledge about Event types found in documentaion only? -
How to set event handler for generic TControl descendant using RTTI
PeaShooter_OMO replied to CoMPi74's topic in General Help
Did you search for the error on the web? SetMethodProp needs TMethod which can be setup.... Have a look at How to set a procedure (function) to an event in delphi 7? -
How to set event handler for generic TControl descendant using RTTI
PeaShooter_OMO replied to CoMPi74's topic in General Help
What are the symptoms? Errors? -
How to set event handler for generic TControl descendant using RTTI
PeaShooter_OMO replied to CoMPi74's topic in General Help
What is inside SetDefaultEventHandlerIfEventExists2? -
Requested for IDE to support more RAM (vote/discuss if you care)
PeaShooter_OMO replied to Tommi Prami's topic in Delphi IDE and APIs
I was wondering the same thing. Is it not automatically considered to be MDI the moment you have resizable/movable forms as child windows inside a "main" form? For instance programs like Photoshop have multiple documents but the moment you "undock" it from the Tab interface it becomes an uncoupled form outside the main form. Firefox acts similarly but an uncoupled document becomes another instance of Firefox. We made programs that have multiple forms inside the main form but they never were "documents" but rather functionality forms and they never were movable/sizable and had no caption bars. I suppose I digress from the topic here. -
'for i:= 0 to 4' does 6 loops when not in Debug mode
PeaShooter_OMO replied to Allan Olesen's topic in General Help
How would this code behave differently between Debug and Release? Do both compile? -
LinkedIn job offer: Remote Senior Software Engineer with Evisions
PeaShooter_OMO replied to Remy Lebeau's topic in Job Opportunities / Coder for Hire
Did the recruiter provide any links to a job spec? I regularly get "recuiters" messaging me in Linkedin talking about a great job but as soon as I ask for a proper job spec they ghost me.