Posts

Why does Delphi not support stand-alone generic methods?

Why does Delphi not support stand-alone generic methods? Is there a technical reason for this? It's such a drag to have to prefix all my generic methods with TSillyRecordWithNoDataButOnlyGenericMethodsToKeepDXHappy

I must be the most clever guy in the world, installing Visual Studio on the same machine as Delphi thinking things couldn't go wrong

I must be the most clever guy in the world, installing Visual Studio on the same machine as Delphi thinking things couldn't go wrong So, I ended up breaking MSBUILD, ie, got the "MSBuildToolsPath is not specified for the ToolsVersion" described here with the fix https://zoomicon.wordpress.com/2017/03/06/fix-delphi-error-msbuildtoolspath-is-not-specified-for-the-toolsversion/ Now I can compile fine from the IDE, but I cannot run MSBUILD scripts, like this: call "DelphiPath\rsvars.bat" msbuild /verbosity:detailed /p:config=release MyProject.dproj This build fails with the following message: "Path-To-.dproj" (default target) (1) -> (SetMakeOptions target) -> C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.tasks(39,196): error MSB4066: The attribute "Runtime" in element is unrecognized. I couldn't found anything on the "Runtime" attribute. Full Delphi reinstall didn't help I installed the Microsoft Build Tools ...

Is anyone else having trouble with Project Groups in Delphi/Berlin?

Is anyone else having trouble with Project Groups in Delphi/Berlin? I have 6 or 7 projects in a group. The source code for the projects has many common units, shared across most, but not all projects. The problem is that when I highlight one project and hit F9 or ^F9, the IDE starts compiling unrelated projects. Often, the other projects are not ready for compilation, so the compile dies on the wrong project. I want the IDE to compile only the highlighted project (like it did before Berlin) and ignore the other projects in the group. I really don't care that the other projects are broken... I want the selected one to compile to completion. It looks like the mouse menus work in the Project Manager, but the hot keys are completely messed up... Unless there is some new feature in the IDE that I need to deactivate.

64-bit vs 32-Bit and XE2

64-bit vs 32-Bit and XE2 Hello, I have a stable server application that utilizes 32-bit under Delphi XE2. Recently, I've seen some articles that show Microsoft is interested in "warning" customers where they are using Desktop vs Metro apps. In addition, WOW32 is getting a little long in the tooth and I'm worried about them doing the same thing for 32-bit apps. My application doesn't need 64-bit, but a few times, customers have asked me about producing a 64-bit version. For the most part, the UI is hidden as a Service and it's running happily on the sysadmin's server. Perhaps they like to audit software and will note when something is still 32-bit. shrug. In any case, I've started looking at targeting my app to 64-bit, but immediately had problems with my software protection (which uses inline assembly). It feels like forever ago, since I addressed UNICODE when I made the switch to XE2, but it's still a thorn in my side and I'm very wary about ...

https://delphi.uz/delphi-programming-language/make-cryptic-code-generator-application-delphi/

https://delphi.uz/delphi-programming-language/make-cryptic-code-generator-application-delphi/ https://delphi.uz/delphi-programming-language/make-cryptic-code-generator-application-delphi/

Hello everybody. Can someone give me some links to literature on RAD Server?

Hello everybody. Can someone give me some links to literature on RAD Server? I am looking dir anything from Installiert RAD Server to how to get my Business logic Set up in it and connecting my clients to it. In my Special case I need to develop a program that is supposed to run in a mobile Windows and on a Desktop. In the Desktop Data is supposed to be worked on for finetuning and printing as Well as Export to Excel of some of the Data. Mobile Data is supposed to be stored locally on tablet until it can be send to the company mssql Database. I hope to have all this squared Out by running Rad Server and communicating through there. Looking Forward dir some tips and help as Well as links to RAD Server. Greetings from Germany Frank

Hello

Hello I have problem with TreeView CreateNodeClass. Here is my code : https://gist.github.com/hatuan/4215b29e6e52c18c426e2cdb452510d3 On test project dblClick work well, ShowMessage show correct menuid0 I include this file to working project, set main form to unit1, and run. DblClick on treeview has menuid0 = '' Very surprise ??? Please help me. https://gist.github.com/hatuan/4215b29e6e52c18c426e2cdb452510d3

Hi there

Hi there, I wanted to follow an upcoming webinar called 'From Really "Old Delphi" to the Future', but none of the dates fits to me. Are these webinars published somewhere later?

Since I needed more elaborate RTTI on published methods for a GExperts experiment, I've put the code by Hallvard Vassbotn​ in a repository on GitHub.

Since I needed more elaborate RTTI on published methods for a GExperts experiment, I've put the code by Hallvard Vassbotn​ in a repository on GitHub. Pull requests are welcome. For now I've imported everything in Delphi 2007 and wrote a rudimentary readme. Next step is to fix the known bugs and upgrade some bits I urgently need to Unicode Delphi versions, then port more bits. https://github.com/jpluimers/HVRTTIUtils https://github.com/jpluimers/HVRTTIUtils

Blog post "Delphi for Linux Database and Web Development" at http://blog.marcocantu.com/blog/2017-march-delphi-linux-database-web.html

Blog post "Delphi for Linux Database and Web Development" at http://blog.marcocantu.com/blog/2017-march-delphi-linux-database-web.html http://blog.marcocantu.com/blog/2017-march-delphi-linux-database-web.html

We have just integrated Apple Pay into our SMX Patron system. Up until this week you couldn't make donations via Apple Pay in the UK (although it has been available in the USA for a few months). Sightsavers, one of our clients, was selected as one of the 22 UK charities to implement this and so we got to do the heavy lifting - especially as the launch date was pulled forward by several weeks!.

We have just integrated Apple Pay into our SMX Patron system. Up until this week you couldn't make donations via Apple Pay in the UK (although it has been available in the USA for a few months). Sightsavers, one of our clients, was selected as one of the 22 UK charities to implement this and so we got to do the heavy lifting - especially as the launch date was pulled forward by several weeks!. The app is a combination of WebBroker, Remobjects and a straight VCL management app. Developed in Delphi XE. Read about it here https://smxi.com/Apple_Pay_SMX_CRM.html https://smxi.com/Apple_Pay_SMX_CRM.html

ANN: StyleControls VCL v. 3.65 with new GP controls released!

Image
ANN: StyleControls VCL v. 3.65 with new GP controls released! http://www.almdev.com What's new: added: TscGPVertPageControl and TscGPVertTabControl (cool GP controls with vertical list of tabs, vector shape for tab and with a lot of features for customization) Demo: http://www.almdev.com/prods/stylecontrols/files/scdemo.zip

I have a strange problem. I have a DUnit application, which I need to run as both GUI (on my development machine) and as a console app (on the build machine). I just copied the project file, renamed it. I have the usual :

I have a strange problem. I have a DUnit application, which I need to run as both GUI (on my development machine) and as a console app (on the build machine). I just copied the project file, renamed it. I have the usual : {$IFDEF CONSOLE_TESTRUNNER} {$APPTYPE CONSOLE} {$ENDIF} And in one app I define the CONSOLE_TESTRUNNER conditional define and in the other I don't. If I COMPILE the console application, it works as a console app. However, if I BUILD then it runs as a GUI app. I have even tried removing the conditional define and explicitly setting it as {$APPTYPE CONSOLE}, to remove the conditional define out of the equation, but then the application just throws out an EInOutError I/O error 105. I guess it's trying to write to the output but failing. But why?

TMS Cryptography Pack v2.4.0.0 released with several new functions:

Image
TMS Cryptography Pack v2.4.0.0 released with several new functions: -New: Stream hashing functions for SHA2, SHA3, Blake2b, RIPEMD-160 -New: Stream encryption/decryption functions for AES, SPECK, Salsa -New: SHA3 derived functions: cSHAKE, KMAC and TupleHash -New: File encryption/decryption/hashing functions support now Unicode characters into file name. -New: File encryption/decryption functions for Salsa -New: Class constructor overloads that allow to set all parameters in all classes. TMS Cryptography Pack can be used in VCL Windows 32/64 and FMX Windows 32/64, OS X, iOS32, iOS64 and Android apps. For more information visit the product page: http://www.tmssoftware.com/site/tmscrypto.asp
In Delphi, how to call WiFi Direct under Android ?

In this third lesson we finish the implementation in Delphi (Object Pascal) and Firemonkey of the MDL button Raised type and Plain style.

In this third lesson we finish the implementation in Delphi (Object Pascal) and Firemonkey of the MDL button Raised type and Plain style. Hugs and stay with God! https://youtu.be/leKq75iB-tQ https://youtu.be/leKq75iB-tQ

New blog post

New blog post https://theroadtodelphi.com/2017/03/09/tlistview-ownerdraw-compat-with-windows-ui-vcl-styles/ https://theroadtodelphi.com/2017/03/09/tlistview-ownerdraw-compat-with-windows-ui-vcl-styles/

Join Craig Chapman and myself for Live Delphi Coding in 15 minutes! https://www.liveedu.tv/mrcraig/

Join Craig Chapman and myself for Live Delphi Coding in 15 minutes! https://www.liveedu.tv/mrcraig/ https://www.liveedu.tv/mrcraig/

I'm trying do change the display mode of content in a grid binded to a database table in firemonkey. The only method is through CustomFormat but no luck in making folowing:

I'm trying do change the display mode of content in a grid binded to a database table in firemonkey. The only method is through CustomFormat but no luck in making folowing: 1. On editing Currency column the DecimalSeparator is "," but in some situations (based on regions) it is "." , so I need to catch that "." and change it to "," like I do in TEdit.OnKeyDown. 2. The currency is displayed rounded to 2 decimals, I need to have 5 decimals. How can that be done? And another question: is it possible to change in Firemonkey the StringGrid design (borders, lines, background, etc., columns, rows, cells) ?

I had an itch the OTA couldn’t scratch…

I had an itch the OTA couldn’t scratch… http://www.davidghoyle.co.uk/WordPress/?p=1608 http://www.davidghoyle.co.uk/WordPress/?p=1608

What's the Delphi equivalent of doing UpperCase with an InvariantCulture in Unicode Delphi versions? (XE and up)

What's the Delphi equivalent of doing UpperCase with an InvariantCulture in Unicode Delphi versions? (XE and up) Background: an inherited Delphi project is giving errors `Field "id" not found` in IBX talking to Firebird 2.5 only on some Turkish systems for various database tables even though the tables have an ID field. I think it's the same issue as https://www.hanselman.com/blog/UpdateOnTheDasBlogTurkishIBugAndAReminderToMeOnGlobalization.aspx i.e.: Turkey has both dotless and dotted i/I characters which means you need to be careful doing case conversion. The database has all identifiers in uppercase, but of course the inherited Delphi source code has a mix of uppercase/lowercase mess both in the SQL and Delphi (I've seen Pascal keywords like beGin in some of the sources). Easiest solution would be to convert all SQL to uppercase in an invariant way at some central place. https://www.hanselman.com/blog/UpdateOnTheDasBlogTurkishIBugAndAReminderToMeOnGlobalization...

Hi all, I need help! :-)

Hi all, I need help! :-) I'd like to have a TValue holding a record instance built starting only from a TRttiType (TRttiRecordType, of course). function TMyClass.ToRecord(const ARecordType: TRttiType): TValue; begin Result := ??? end; I already have a version of this function using generics: function ToRecord : T; but I'd like to have a more general one using only TRttiType. Any help would be greatly appreciated! Thanks

hello there

hello there, my supplier give me a library (.lib) for C++ Builder and Visual Studio C++. Usually I make a dll wrapper in Visual Studio, and I use the .dll file in Delphi, but isn't possible use directly or import in some way the lib for C++ Builder in Delphi? Thank you

Originally shared by Boian Mitov

Originally shared by Boian Mitov Video tutorial on how to send text data over Wi-Fi from Delphi to OLED Display connected to Visuino programmed NodeMCU/ESP8266, and display in the OLED text typed in Memo. #Visuino #ESP8266 #Arduino https://www.youtube.com/watch?v=SMCVo1xh_TI&feature=share

Guys, I am tinkering with mobile development in Delphi 10, and I have a question about resolutions on mobile devices. I have 2 devices here, one older tablet that is 800x480, and my phone that is 1440x2560.

Guys, I am tinkering with mobile development in Delphi 10, and I have a question about resolutions on mobile devices. I have 2 devices here, one older tablet that is 800x480, and my phone that is 1440x2560. Now, on the tablet, for some odd reason my FM application reports the resolution at 1066x592, and on my phone it reports as 640x360. Now I assume that on my phone it just runs in a form of HiDPI mode, but on the tablet, it is causing lines to be completely missing. How do I correct this situation on the tablet? The real resolution is 0.75 of what FM reports it to be.

Embarcadero, have you anticipate a Delphi compiler for Web assembly ?

Embarcadero, have you anticipate a Delphi compiler for Web assembly ? It could be a great opportunity for delphi. https://hacks.mozilla.org/2017/03/firefox-52-introducing-web-assembly-css-grid-and-the-grid-inspector/ https://hacks.mozilla.org/2017/03/firefox-52-introducing-web-assembly-css-grid-and-the-grid-inspector/

Could somebody with access to the coming Delphi 10.2(?) please test this and maybe update this or post a new report:

Could somebody with access to the coming Delphi 10.2(?) please test this and maybe update this or post a new report: TBufferedFileStream Seek performance is less than optimal The implementation for TBufferedFileStream.Seek could be improved a lot by first checking whether the new position is still within the buffer. Currently it always writes the current buffer to the file and then rereads it at the new position. This results in two unnecessary I/O operations and makes the buffer useless e.g. when writing backwards or with gaps. Steps: 1. Create a new VCL-Application, add a memo and a button 2. For add an OnClick event for the button as: procedure TForm1.Button1Click(Sender: TObject); begin TestBackwards(0); TestBackwards(1024); end; 3. Add the following TestBackwards method: procedure TForm1.TestBackwards(_BufSize: integer); var st: TBufferedFileStream; i: Integer; b: Byte; Start: Cardinal; Ticks: Cardinal; begin m_Output.Lines.Add(Format('Writing file with buffer...

So it seems GodZilla and Linux will be Enterprise or above only !

So it seems GodZilla and Linux will be Enterprise or above only ! So no love for RadStudio Pro users. No mention of this on any of the Roadmaps that I have seen. A quote from Jim McKeeth in Preparing for Linux "Since Linux is focused on Server, the Enterprise (or Architect) edition is where all the action is going on". A little disappointed on this EMB for us smaller developement companies. I assume this is what others have found out ?

Hello there

Hello there, Is this a bug or a feature? Calling a generic method w/o specifying the generic type. It works like a charm type Foo = record public class procedure SayIntfName (const Value: T); static; class procedure SayClassName (const Value: T); static; end; class procedure Foo.SayIntfName (const Value: T); var ctx: TRttiContext; begin Writeln(ctx.GetType(TypeInfo(T)).Name); end; class procedure Foo.SayClassName (const Value: T); var ctx: TRttiContext; begin Writeln(ctx.GetType(TypeInfo(T)).Name); end; var Bar: IInvokable; Zod: TStringBuilder; begin Foo.SayIntfName(Bar); Foo.SayClassName(Zod); Readln; end.

Hello

Hello, I have a function that allows me to change the resolution of the screen by DELPHI. Does anyone know how to change the percentage for text size and applications