Posts

Marco Cantù

Marco Cantù An IDE feature to comment all lines with sysntax error (or code lines lacking definition of variable name/object/classes etc) within a pas file or even entire project can help faster compilation of projects for analysis purpose and a gauge of estimation of effort in terms of LOC (lines of code) requiring change The feature can be a great help in estimation of required effort for migration projects from earlier IDE versions to later

This bundle might interest some Tokyo Ent. users: https://www.humblebundle.com/books/linux-book-bundle - and the git book is for everyone :)

This bundle might interest some Tokyo Ent. users: https://www.humblebundle.com/books/linux-book-bundle - and the git book is for everyone :) https://www.humblebundle.com/books/linux-book-bundle

First dialog re-factored to be 100% free of code thanks to the wonderful KnockOff. Now for the rest of them...

First dialog re-factored to be 100% free of code thanks to the wonderful KnockOff. Now for the rest of them... https://bitbucket.org/sglienke/knockoff

AARRGHH !

AARRGHH ! I can't reproduce this bug but I want to report it here. On a project under Tokyo, I use an avanced JSON Unit based on the one I've published on my web site. http://lookinside.free.fr/delphi.php?Delphi+XE8+et+JSON at application startup, I read a Record from a JSON file, it contains the application configuration. But after some change in the code (not related to JSON nor the Record), I've hit F9 and the application starts to do strange things...the problem was about the configuration. I've followed the JSON parsing to find out that the TypeInfo informations where corrupted. It was a Record TypeInfo with the rigth name but with fields informations from an other Record ! So my JSON Parser just dropped the values because nothing matched the record definition. I just had to rebuild the project to fix that nasty bug. not cool :/ http://lookinside.free.fr/delphi.php?Delphi+XE8+et+JSON

I'm migrating a VCL app to FMX Mac OS.

I'm migrating a VCL app to FMX Mac OS. Our application opens .png files that newly appear in a specific folder. These are created by a third party app. We display them in a TImage as "pseudo-video" at about 10 fps. We don't mind if we drop files now and then. In Windows, we chose not to use the Windows hooks that are available to monitor folder events. We simply use a TTimer, calling TDirectory.GetFiles once a second and looking for a file we haven't already processed. We delete files after we've processed them, so the file list doesn't get too big. In Windows, before actually opening an image for reading, we check if it is still open by the third party app with this code: function FileClosed( const aFileName: String):Boolean; var hInputFile: THandle; begin hInputFile := CreateFile(Pchar(aFilename), GENERIC_WRITE, 0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); Result := (hInputFile INVALID_HANDLE_VALUE); if Re...

Edit: Nevermind - RangeCheck was off.

Edit: Nevermind - RangeCheck was off. Should this code create an Index out of bounds error? type TArrayType = TArray ; procedure TSomeClass.GetArray(var anArray: TArrayType); begin SetLength(anArray, 10); for ix := 1 to 10 // Should have been 0 to 9 do anArray[ix]:= ix; // end; procedure Test(SomeClassInst: TSomeClass); var Arr: TArray ; begin SomeClassInst.GetArray(Arr); // do something end;

Blog post "Webinar Tomorrow: Understanding Automatic Reference Counting" at http://blog.marcocantu.com/blog/2017-may-webinar-understanding-arc.html

Blog post "Webinar Tomorrow: Understanding Automatic Reference Counting" at http://blog.marcocantu.com/blog/2017-may-webinar-understanding-arc.html http://blog.marcocantu.com/blog/2017-may-webinar-understanding-arc.html

How to get pointer to private method of TApplication?

How to get pointer to private method of TApplication? So far I'm using such a trick: lPointer := @TSomeClass.PrivateMethod; And it works (e.g. for Firedac classes), but for TApplication methods I get compile error e.g.: [dcc32 Error] E2361 Cannot access private symbol TApplication.UpdateVisible Why?

Hi

Hi , I have a problem with YoutubePlayer API Follow you, I import .jar file and use JNI .pas in my project But I have a error ; A YouTubePlayerView can only be created with an Activity which extends YouTubeBaseActivity as its context.>>>> In my Code: try FView:= TJYouTubePlayerView.JavaClass.init(TAndroidHelper.Context); FView.initialize( StringToJString(DEVELOPER_KEY), FOnInitializedListener); except on E: Exception do log.d('EE/ '+E.Message); end; >> I want to ask you, how can I set > Thanks All,

Hello!

Hello! From a Delphi application, we need to apply an XSLT transform to an XML file into an HTML page. This is mostly done, but we are receiving a CRLF sequence in the XML that is impeding certification because a little (but very important) piece of data is displaying incorrectly. We have tried to use fn:replace but there are no examples on how to use it with the content of a tag. Does anybody have pointers? Thanks :)

Before I start implementing it myself: Is there already a debug visualizer for Delphi 2007 (and possibly even older versions?) that displays:

Before I start implementing it myself: Is there already a debug visualizer for Delphi 2007 (and possibly even older versions?) that displays: * TDateTime as date / time string rather than a floating point value? * Multi line strings / TString/TStringlists as the formatted strings rather than 'bla'#$D#$A'blub' I'm mostly interested in the watch window, but support for the "Evaluate/Modify" dialog would also be appreciated.

Where can I find a version of dependency walker that works on Windows 10.

Where can I find a version of dependency walker that works on Windows 10. I've tried following the instructions here: https://stackoverflow.com/questions/8832936/profiling-x86-executable-with-dependency-walker-hangs-on-windows-7-x64 But after downloading 1GB :- depends.exe anywhere on my system. The version of dependency walker that google turns up is 2.2.600 which is broken on W10. I need version 2.2.888 which is included in the WDK according to the docs, but does not actually get installed. https://stackoverflow.com/questions/8832936/profiling-x86-executable-with-dependency-walker-hangs-on-windows-7-x64

Hi All

Hi All, how can i use YoutubePlayer API in my projects ; Any idea ; Thanks all,

OFX/OFC file format is widely used in Internet Banking of the leading financial institutions in the world.

OFX/OFC file format is widely used in Internet Banking of the leading financial institutions in the world. Need stars and more OFX file! https://github.com/leogregianin/ofx-reader

In recent versions, we see many new components for Win10 apps. What strikes me though is that one can use them in VCL apps.

In recent versions, we see many new components for Win10 apps. What strikes me though is that one can use them in VCL apps. Shouldn't those Win10-specific be avail for FMX as well? And the same goes for Metropolis apps. I feel like EMBD forces me to go to VCL if I want a modern Win app. But I still want to do cross-platform development for my own apps.

I am FindFirst, etc, to get a list of files and adding them to a table, but, the sql is tripping up on curly braces '{' and '}'.

I am FindFirst, etc, to get a list of files and adding them to a table, but, the sql is tripping up on curly braces '{' and '}'. I have RegEx code to replace the. RegEx.Subject := sr.Name; RegEx.RegEx := '{'; RegEx.Replacement := '\{'; if RegEx.Match then begin RegEx.Replace ; end; RegEx.Subject := sr.Name; RegEx.RegEx := '}'; RegEx.Replacement := '\}'; if RegEx.Match then begin RegEx.Replace; end; Is this the right way do this? AM I using the correct escape character? D XE7 Pro & Win 10 Thanks...Dan'l

Blog post "Centennial Bridge: BUILD, Creators Update, Windows 10 S and More" at http://blog.marcocantu.com/blog/2017-may-centennial-build-windows10s.html

Blog post "Centennial Bridge: BUILD, Creators Update, Windows 10 S and More" at http://blog.marcocantu.com/blog/2017-may-centennial-build-windows10s.html http://blog.marcocantu.com/blog/2017-may-centennial-build-windows10s.html

And here is why I think twice before spending time to report feature requests to QP

Image
And here is why I think twice before spending time to report feature requests to QP And even bugs/unexpected behavior are regularly being sweeped under the carpet reclassified as new feature. 46 out of those 84 resolved/closed have the resolution "wont fix" or "works as expected". This is not intended to be a flame but just pointing out the lack of emphasis on new features (at least those being reported in QP) FYI: Marco Cantù David Millington Horácio Filho

Hello

Hello, Any doc for connect to Azure Cosmos DB from delphi ? Any third party components ? regards

Hi! I've posted this tutorial on How to run Delphi Applications on Linux with Docker: http://yeiei.net/en/running-delphi-applications-on-linux-with-docker/ Enjoy and let me know your comments!

Hi! I've posted this tutorial on How to run Delphi Applications on Linux with Docker: http://yeiei.net/en/running-delphi-applications-on-linux-with-docker/ Enjoy and let me know your comments! http://yeiei.net/en/running-delphi-applications-on-linux-with-docker/

What's the point of having abstract classes in Delphi? Is there any use case? Hey, you can instantiate an abstract class just fine (no compiler error, warning, nor hint). You can even USE such object just fine

What's the point of having abstract classes in Delphi? Is there any use case? Hey, you can instantiate an abstract class just fine (no compiler error, warning, nor hint). You can even USE such object just fine Yes, I know, the docs: http://docwiki.embarcadero.com/RADStudio/en/Classes_and_Objects_(Delphi) Note: Delphi allows instantiating a class declared abstract, for backward compatibility, but this feature should not be used anymore. So, Delphi got this new feature called abstract classes on Delphi 7. That was in 2002 IIRC. So fifteen years later all we got is a just a highlighted keyword? I'm completely shocked /rant off

CrossVcl 0.41 just released

Image
CrossVcl 0.41 just released + TListView (Report mode only yet) and TRichEdit controls + More GDI+ APIs + More new APIs http://www.crossvcl.com/history.html

Originally shared by Thomas Mueller (dummzeuch)

Originally shared by Thomas Mueller (dummzeuch) Eric Berry just posted this to the GExperts mailing list: ---------- I've posted Thomas's current binary builds as the official GExperts 1.38 release on the web site. This release adds support for Delphi 1.01 Berlin and 10.2 Tokyo (beta), as well as all of the other things Thomas has added and fixed over the last year or two. Home Page: http://www.gexperts.org/ Download: http://www.gexperts.org/download/ Status Updates and Discussion: https://plus.google.com/communities/112747591344358749692 Note: I'm no longer doing much software development, so I'm not actively reviewing or editing the GExperts code or doing builds, but I am making a few minor web site updates, as needed. Erik ---------- Just in case this is not clear enough: These are the very same installers that I have had on my homepage since January 2017. https://blog.dummzeuch.de/experimental-gexperts-version/ https://blog.dummzeuch.de/experimental-gexperts-version...

Change TDateTimePicker.format to yyyy-MM-dd HH:mm:ss

Change TDateTimePicker.format to yyyy-MM-dd HH:mm:ss but the TDateTimePicker.kind only can set to dtkDate or dtkTime, so if i change the date and time together on UI, only the date or time changed in TDateTimePicker.Datetime. Which means, if i wanna get the date and time together, i should put TWO TDateTimePicker on the form. Is that possible for you to update the src to improve it? I also reported a QC Marco Cantù https://quality.embarcadero.com/browse/RSP-18215

Coworker and me were just thinking if this (or similar syntax) would be nice to have in Delphi:

Coworker and me were just thinking if this (or similar syntax) would be nice to have in Delphi: car := TCar.Create begin Name := 'Chevrolet Corvette'; Color := TColors.Yellow; end; Edit: After pointing out this might lead to code defects because begin end can be used regardless this feature here is another proposal (similar to how Oxygene does it): car := TCar.Create( Name: 'Chevrolet Corvette', Color: Colors.Yellow, MaxSpeedKm: 300 ); With a ctor that has an argument: car := TCar.Create('Chevrolet Corvette'; // Color: Colors.Yellow; MaxSpeedKm: 300 ); Suggestion by Eric Grange - like the original one but reusing the with to make it safe against issues using begin : car := TCar.Create with Name := 'Chevrolet Corvette'; Color := Colors.Yellow; MaxSpeedKm := 300 end; Ctor with parameter: car := TCar.Create('Chevrolet Corvette') with Color := Colors.Yellow; MaxSpeedKm := 300; end; Similar to how since C# 3.0 you can initial...
Are there blank characters in unicode that have the same widths as period, comma and digits?
I have a debating at work with developers with knowledge about .NET and Java, but minimum knowledge on Delphi. Debating is about using an architecture based on POJO objects instead of using TDataSet on a server application. I can't see any advantage of excluding the use of TDataset built-in functionality, and to create a small framework based on classes which map the tables from database. Server application is not designed to perform heavy CRUD operations. It just feed several .NET clients with data using RemObjects. I see a big disadvantage to create a plain class to hold values from a SQL select statement, instead of using a dataset. When the SQL is modified, or a table is modified, then all the classes need to be modified also. On the other hand, if using TDataset, developers should dedicate a small time involved to learn how to use Delphi datasets. Any thoughts on this?

New "Windows10 Office Light" and "Windows10 Office Dark" VCL styles released!

Image
New "Windows10 Office Light" and "Windows10 Office Dark" VCL styles released! http://www.delphistyles.com

New product from DelphiStyles !

Image
New product from DelphiStyles ! FM UI Plus - product, which includes patch installer for RAD Studio to improve default UI for FireMonkey applications. Now it comes as Bonus with "All Styles LifeTime Subscription" and "FMX Styles LifeTime Subscription"! At this moment it includes improvements for Windows and macOS platforms. + new default HQ style for macOS from delphistyles.com , which includes graphics with all specifics of Sierra at this moment + new focused frame around controls on macOS, which looks as native + new toolbar style, which can be merged with window caption to get more native look and feel on macOS + fixes of text drawing on macOS + fixes of TCalendar, TGrid drawing on Windows and macOS http://www.delphistyles.com/fmuiplus.html

Now records. Raudus translate app-client server to Web.

Image
Now records. Raudus translate app-client server to Web.