Noutați

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)EmbarcaderoStudio21.0binLicenseManager.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 64-bit, remove the C:Program Files (x86)EmbarcaderoStudio21.0 directory (or the custom folder you had used).    Remove the C:UsersPublicDocumentsEmbarcaderoStudio21.0 directory    Remove the C:ProgramDataEmbarcaderoStudio21.0 directory.    Remove the %APPDATA%EmbarcaderoBDS21.0 directory.    Remove the HKEY_CURRENT_USERSOFTWAREEmbarcaderoBDS21.0 registry key    If Windows 64-bit, remove the HKEY_LOCAL_MACHINESOFTWAREWow6432NodeEmbarcaderoBDS21.0    If Windows 64-bit, remove the following files from C:WindowsSysWOW64:        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 Sydney If you had problems in the second step (uninstalling from Windows Control Panel), try this Microsoft tool to solve un-installation problems: http://go.microsoft.com/?linkid=9779673

Read More

Easily Create A Python Container Type In Delphi And Execute It In This Windows Sample App

Earlier we learned how to create a Python type using Delphi classes. How about creating a Python type with some containers or collections capabilities in Delphi and accessing its elements? Python4Delphi PyObject contains Type Services routines e.g Basic, Number, Sequence, Mapping which can be overridden with our custom Python Types Delphi classes. This post helps to do that. Python4Delphi Demo27 Sample App shows how to create a Module, Python type, Import the module, and Python Type in a python script, create a sequence type object and access some of the service routines like length, indexing, etc. You can find the Demo27 source on GitHub. Prerequisites: Download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out this video Getting started with Python4Delphi. Components used in Python4Delphi Demo27 Sample App: TPythonEngine: A collection of relatively low-level routines for communicating with Python, creating Python types in Delphi, etc. It’s a singleton class. TPythonGUIInputOutput: Inherited from TPythonInputOutput (which works as a console for python outputs) Using this component Output property you can associate the Memo component to show the Output. TPythonModule: It’s inherited from TMethodsContainer class allows creating modules by providing a name. You can use routines AddMethod, AddMethodWithKW, AddDelphiMethod, AddDelphiMethodWithKeywords to add a method which should be type compatible with this routine parameter. You can create events using the Events property. TPythonType: This component helps to create a new python type in Delphi which is inherited from the hierarchy of classes (set of APIs to create, manage methods, and members). TMemo: A multiline text editing control, providing text scrolling. The text in the memo control can be edited as a whole or line by line. You can find the Python4Delphi Demo27 sample project from the extracted repository ..Python4DelphiDemosDemo27.dproj. Open this project in RAD Studio 10.4.1 and run the application. Implementation Details: PythonEngine1 provides the connection to Python or rather the Python API. This project uses Python3.9 which can be seen in TPythonEngine DllName property. PythonGUIInputOutput1 provides a conduit for routing input and output between the Graphical User Interface (GUI) and the currentlyexecuting Python script. PythonModule1 with a Module name test is created. In this sample, Created a Delphi class(TMySeq) implementing a new Python type. It is derived from TPyObject. It overrides some Mapping services virtual methods such as MpLength, MpSubscript. function TMySeq.MpLength: NativeInt; begin Result := 10; end; function TMySeq.MpSubscript(obj: PPyObject): PPyObject; begin Result := obj; GetPythonEngine.Py_XINCREF(obj); end; function TMySeq.MpLength: NativeInt; begin   Result := 10; end;   function TMySeq.MpSubscript(obj: PPyObject): PPyObject; begin   Result := obj;   GetPythonEngine.Py_XINCREF(obj); end; During PythonType1 initialization assign the property PyObjectClass with the class TMySeq. procedure TForm1.PythonType1Initialization(Sender: TObject); begin with Sender as TPythonType do PyObjectClass := TMySeq; end; procedure TForm1.PythonType1Initialization(Sender: TObject); begin   with Sender as TPythonType do     PyObjectClass := TMySeq; end; On Clicking Execute Button the below code is executed. procedure TForm1.Button1Click(Sender: TObject); begin PythonEngine1.ExecStrings(Memo2.Lines); end; procedure TForm1.Button1Click(Sender: TObject); begin   PythonEngine1.ExecStrings(Memo2.Lines); end; Which will execute the python script mentioned below. import test S=test.CreateMySeq() print (S) print (len(S)) print (S[1]) print (S[1,2]) print (S[1:2]) print (S[1:20:2]) print (S[…]) print (S[1,4,5:8, 10:20:2, …]) import test S=test.CreateMySeq() print (S) print (len(S)) print (S[1]) print (S[1,2]) print (S[1:2]) print (S[1:20:2]) print (S[…]) print (S[1,4,5:8, 10:20:2, …]) Note. CreateMySeq in the above script is created automatically by Python4Delphi when the property GenerateCreateFunction of TPythonType1(MySeq) is true. Python4Delphi Demo27

Read More

Popular Enterprise Grade Password Identity Manager Powers 70,000+ Businesses And Is Built In Delphi

1Password is a premier password and identity manager that runs in millions of desktops and mobile devices worldwide and it is built in Delphi. According to their site in addition to personal and family options it also powers the enterprise with more than 70,000 businesses trusting 1Password to secure their business and protect their data. Stefan van As and Mark Eaton from AgileBits provided some information on the third party components that they make use of in the 1Password for Windows version. It really is amazing all of the different components that they make use of from the massive third party component ecosystem available to all Delphi developers. The Delphi developer ecosystem is one of the key things that makes it such a powerful development tool. Here is an overview of the 3rd party components used in 1Password: Browser Helper Objects (BHOs) — this is what powers 1Password inside Internet Explorer, Bonjour — this is what powers Wi-Fi Sync (here is an unrelated Delphi implementation), ChilkatCrypt — this is what powers some of our crypto, MS Crypto — this is the Pseudo Random Number Generator (PRNG), DISQLite — Some of 1Password’s features – such as Watchtower, for example – are utilizing SQLite. Because 1Password 4 is in Delphi 2007, we use DISQLite for that (today, it would be using FireDAC for that), dxgettext — this is used to localize 1Password. It works nicely with Crowdin, a localization project management platform, GraphicEx and Graphics32 — this gives (alpha channel) transparency, HyperString — super fast string handling routines. (no longer available), OpenSSL — this is what powers PBKDF2 (among other crypto routines), sgcWebSockets — The WebSockets are used with the Chrome and Firefox browser extensions, StreamSec — another crypto library, mostly for SSL/TLS, and zlib and LibTar — For OS X-compatible compression routines. Additionally they use EurekaLog — For diagnostics reporting, FinalBuilder — For build management, and Inno Setup — The installation wizard. Website https://1password.com/ Screenshot Gallery

Read More

Learn How To Send Arrays To A PostgreSQL Database Server Using FireDAC In Delphi On Windows

Location You can find the Arrays project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDatabaseFireDACSamplesDBMS SpecificPostgreSQLArrays Subversion Repository: You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version. How to Use the Sample Navigate to the location given above and open PGArrays.dproj. Press F9 or choose Run > Run. Files File in Delphi Contains PGArrays.dprojPGArrays.dpr The project itself. fMain.pasfMain.fmx The main form. Implementation Before running the sample, the main components are configured at design time using the Object Inspector as follows: A TFDConnection object named FDConnection1. This is the FireDAC connection object that the sample uses to connect to a DBMS. The sample sets the ConnectionDefName property to PG_Demo. A TFDQuery object named FDQuery1. This component implements a dataset capable of executing SQL queries. The sample sets its Connection property to FDConnection1 to specify the FireDAC connection object. A TDataSource object named DataSource1. This component provides an interface between a dataset component and data-aware controls on a form. In this sample, it is used to provide communication between the dataset and the grid where the dataset is displayed. To this end, the sample sets the following properties: The DataSet property of DataSource is set to FDQuery1. The DataSource property of DBGrid1 is set to DataSource1. When you run the application, you see a grid, a combo box and two buttons labeled as PG Read and PG Write. The purpose of these components in this sample is the following: TDBGrid – This sample uses the grid to display the arrays. TComboBox – Use the combo box to choose whether to define the array as ftArray or ftDataSet. TButtons – Both buttons have an OnClick event to do the following:Uses the Open method to read the arrays from the database server. The sample displays the arrays on the grid.Press this button to send arrays to a database server. When you press this button, the sample takes the following steps: Uses the Text property of SQL to set the SQL command that FDQuery1 will execute. Sets the TFDParam.DataTypeName to specify the field name as .. Sets the TFDParam.ArrayType property to atTable.Note: If you set it to atArray it does not work. Sets the array size with the TFDParam.ArraySize property. Sets the arrays using the AsStrings property: Sends the arrays to the database server by executing the SQL command specified in the first step. For more information you can refer to the link below: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.PostgreSQL_Arrays_Sample Check out the demo source code for PostgreSQL Arrays in Windows apps here.

Read More

Quickly Learn How To SubClass A Python Type Created In Delphi With This Windows Sample App

import spam   class MyPoint(spam.Point):   def Foo(Self, v):     Self.OffsetBy(v, v)   # old way to create a type instance p = spam.CreatePoint(2, 5) print (p, type(p)) p.OffsetBy( 3, 3 ) print (p.x, p.y) print (“Name =”, p.Name) p.Name = ‘Hello world!’ print (“Name =”, p.Name)   # new way to create a type instance p = spam.Point(2, 5) # no need to use CreateXXX anymore print (p, type(p)) p.OffsetBy( 3, 3 ) print (p.x, p.y)   # create a subtype instance p = MyPoint(2, 5) print (p, type(p)) p.OffsetBy( 3, 3 ) print (p.x, p.y) p.Foo( 4 ) print (p.x, p.y) print (dir(spam)) print (spam.Point) print (“p = “, p, ”  –> “,) if type(p) is spam.Point:   print (“p is a Point”) else:   print (“p is not a point”) p = 2 print (“p = “, p, ”  –> “,) if type(p) is spam.Point:   print (“p is a Point”) else:   print (“p is not a point”) p = spam.CreatePoint(2, 5) try:   print (“raising an error of class EBadPoint”)   p.RaiseError() # it will raise spam.EBadPoint except spam.PointError as what: # this shows you that you can intercept a parent class   print (“Caught an error derived from PointError”)   print (“Error class = “, what.__class__, ”     a =”, what.a, ”   b =”, what.b, ”   c =”, what.c)   # You can raise errors from a Python script too! print (“——————————————————————“) print (“Errors in a Python script”) try:   raise spam.EBadPoint(“this is a test!”) except:   pass   try:   err = spam.EBadPoint()   err.a = 1   err.b = 2   err.c = 3   raise err except spam.PointError as what: # this shows you that you can intercept a parent class   print (“Caught an error derived from PointError”)   print (“Error class = “, what.__class__, ”     a =”, what.a, ”   b =”, what.b, ”   c =”, what.c)   if p == spam.CreatePoint(2, 5):   print (“Equal”) else:   print (“Not equal”)

Read More

Easily Add Slide Animations To Your Cross Platform Apps With Gesture Support In This FireMonkey Sample

In this post, you will discover two different demo application, the first one shows you how to add sliding tabs to an application through the use of multiple tabs with custom settings, next and back buttons, and gesture support. The second sample shows you how to implement a master-detail interface and display the Multiview control as a slide-in drawer, popover menu, docked panel, and more. What can you learn? Tab Control Input Form Creation Gestures Animation and managing the form with custom functions You can get these demo application from GetIt! Be sure to check out more sample applications in GetIt here!

Read More

Powerful Media Player Software Downloaded 19+ Million Times Built In Delphi

ALLPlayer is a powerful media player software that will literally will play almost all the media and formats that you encounter in any given day and it is built in Delphi. According to ALLPlayer it has had over 19 MILLION downloads. It can handle 3G2, AVI, MKV, AVI, FLV, DAT, MOV, M2TS, MP4, 3GP, VOB, MPG, APE, AU, MKA, MP3, OGG, WAV and AC3 formats, as well as DVDs, audio CDs, animated GIFs and any link that you specify. The primary features of ALLPlayer include supporting the vast majority of video and audio media and formats AND automatically searches and downloads matching subtitles for your media files. A companion app also built in Delphi is the ALLMediaServer which allows you to watch movies, listen to music or view photos from your computer on your TV, smartphone or other device compatible with Samsung AllShare DLNA. Website https://www.allplayer.org/ Screenshot Gallery

Read More

TFDBatchMove Is A Powerful Way To Move Data Between Text Files And Tables Using Datasets In Delphi

Location You can find the TFDBatchMove sample project at: Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to: Object PascalDataBaseFireDACSamplesComp LayerTFDBatchMoveMain. How to Use the Sample Navigate to the location given above and open: Press F9 or choose Run > Run. Select one of the following connections from the Use Connection Definition drop-down menu: Access_Demo, Access_Demo_Pooled, SQLite_Demo or SQLite_Demo_Pooled. Click the three buttons to fully test the component behaviour: Click 1. Move text to table to load the data from the Data.txt file into a table. Click 2. Move table to table to move the dataset from one table to a different one. Click 3. Move table to text to move the table content to an output file DataOut.txt. Implementation 1. Move text to table button: This button loads the content from a txt file located at Start | Programs | Embarcadero RAD Studio Sydney | SamplesObject PascalDataBaseFireDACSamplesComp LayerTFDBatchMoveMaindata.txt into a table from the selected DBMS. The sample adds the FireDAC.Comp.BatchMove.Text unit to the interface uses section to allow the creation of a text reader TFDBatchMoveTextReader and a dataset writer TFDBatchMoveDataSetWriter. Sets the FileName property of TFDBatchMoveTextReader with the location of data.txt. This is the file used to load the data to the table. Also several DataDef properties are adjusted according to the text file format. DataDef.Separator := ‘,’; It defines the separator used to separate the fields in the text file. DataDef.WithFieldNames := True; It specifies that the field name is included in the first row of the text file. Uses the Dataset property of TFDBatchMoveDataSetWriter to set the destination dataset. Also Optimise property is set to False to allow the dataset content to be visualized using TDBGrid. The GuessFormat method is called before loading the data to automatically recognize the text file structure. Then the demo executes the TFDBatchMove component and shows the loaded data using a query in the TDBGrid. 2. Move table to table button: This button moves the data between two different tables on the same DBMS. The sample creates a TFDBatchMoveDataSetReader dataset reader and a TFDBatchMoveDataSetWriter dataset writer. Uses the Dataset property of TFDBatchMoveDataSetReader to set the source dataset, qryLoaded. Uses the Dataset property of TFDBatchMoveDataSetWriter to set the destination dataset, qryMoved. It executes the TFDBatchMove component and shows the query of both datasets on the TDBGrid. 3. Move table to text button: This button copies the data from the table source to an output file located at the application’s path. It creates the destination file: DataOut.txt. The sample creates a TFDBatchMoveDataSetReader dataset reader and a TFDBatchMoveTextWriter text writer. Uses the Dataset property of TFDBatchMoveDataSetReader to set the source dataset, qryLoaded. Sets the FileName property of TFDBatchMoveTextWriter to set the output file name and path: Start | Programs | Embarcadero RAD Studio Sydney | SamplesObject PascalDataBaseFireDACSamplesComp LayerTFDBatchMoveMainDataOut.txt. It executes the TFDBatchMove component to create the file and save the data to the output file. You can refer to the link below for more details about this sample: http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.TFDBatchMove_Sample Check out the full source code for the TFDBatchMove demo over on GitHub!

Read More

Boost Productivity With Useful Bookmarks IDE Plugin To Bookmark And Navigate Code In Delphi And C++Builder

Many know how to use BookMark in your code editor using the RAD Studio IDE. You can mark a location in your code with a bookmark and jump directly to it from anywhere in the file. Bookmarks are preserved when you save the file and available when you reopen the file in the Code Editor. These existing IDE Bookmark features can be replaced with a flexible IDE Plugin Bookmarks 1.6.2. This post will help to understand more about this plugin. This is applicable for Delphi/C++ Builder. Overview of the BookMark1.6.2 As we know existing IDE Code editor has a bookmark feature, where a user can book mark up to 10 bookmarks and easily navigate to the code. This same feature is Replaced with an elegant Bookmark Icon and with some more shortcuts like auto numbering the Bookmark by short cut key (ctrl+B). Jump between the markers quickly by pressing (ctrl+ Alt+ Left or Right Arrow) keys. Never overwrite an existing bookmark accidentally. How to install: You can easily install this IDE Plugin from GetIt Package Manager. The steps are as follows. Navigate In RAD Studio IDE->Tools->GetIt Package Manager->select IDE Plugins in Categories-> BookMarks 1.6.2 by Embercadero Technologies and click Install Button. Read the license and Click Agree All. An Information dialog saying ‘Requires a restart of RAD studio at the end of the process. Do you want to proceed? click yes and continue. It will download the plugin and installs it. Once installed Click Restart now. BookMarks1.6.2 How to use: Open some projects in the IDE, place the cursor in some lines, and press Ctrl+B. A Bookmark Icon Popped with a Number and placed a marker. Like this, you can create 10 bookmarks. Beyond 10 Bookmarks it is marked as # instead of a number. You can press Ctrl + 1, Navigate to the first bookmark, press Ctrl + 2, and so on. For the 10th Bookmark, it is represented as 0 and the shortcut key is Ctrl+0. Beyond 10 Bookmarks, it can be marked as #. Jump between the BookMarks quickly with Ctrl+Alt+Left or Right Arrow. You can view/add/clear the bookmarks by clicking Menu View->Editor->BookMarks. View Bookmarks Be sure to check out all the available sample applications here! Find out more information about the Bookmarks plugin in Embarcadero GetIt.

Read More

FlexCel .NET, .NET5, Blazor and WebAssembly – Part 1

Introduction: Supporting .NET 5 We’ve just released FlexCel .NET 7.8, which adds support for .NET 5. Usually, “adding support” for a new version of a .NET framework is just recompiling the code, but in this case, as .NET 5 is the successor of .NET Core 3, not of .NET framework 4.8, things got a little more complicated. There were subtle errors generated from the switch from NLS in Windows to ICU (see https://docs.microsoft.com/en-us/dotnet/standard/globalization-localization/globalization-icu ), and there were issues with the switching of the graphics engine from GDI+ to SKIA. For this release we spent a lot of time optimizing the SKIA rendering, so it is now a little faster than GDI+. We added a way to switch back to GDI+ in Windows if you need to deal with WMF/EMF files or right-to-left languages (see https://doc.tmssoftware.com/flexcel/net/guides/net-core-guide.html ). We made a full review of all string comparisons in the code to ensure they work with ICU. But this is all just business as usual. For this post, we wanted to have a little fun. And so we decided to investigate what cool stuff we can do with .NET 5 and FlexCel. Generating a client-side app using Blazor and WebAssembly Even if still a work in progress, one of the hot new things in .NET 5 is the improvements in Blazor, and more specifically, Blazor WebAssembly. Blazor WebAssembly allows you to run a web app enterely on the browser, offline, in electron, and it even supports Progressive Web Applications It made sense then to start with a small WebAssembly app using FlexCel .NET. But before getting into that and getting the hopes too high, I’d like to mention two limitations currently in Blazor WebAssembly: Blazor doesn’t yet support AOT. This means that in order to compile to WebAssembly, Blazor currently has a .NET interpreter running in WebAssembly, and the interpreter runs .NET IL, not WebAssembly IL. FlexCel isn’t directly converted to WebAssembly, but it rather runs in the browser as .NET IL. And because of there is no “real” FlexCel WebAssembly yet, it is not currently feasible to call FlexCel WebAssembly from TMS WEB Core The graphics engine we use for cross-platform rendering,(SkiaSharp), doesn’t currently support Blazor WebAssembly, even if they are working on it. Not having SKIA means that you can’t use the FlexCel rendering engine in WebAssembly, so you currently can’t export an Excel file to PDF, SVG, or HTML in Blazor WebAssembly.Note that “Server Blazor”, which runs native .NET 5 code in the server, doesn’t have this limitation. Both limitations should go away relatively soon, but we wanted to be completely honest about the current state. So now, with that out of the way, let’s start. For this first example, we will create a Blazor WebAssembly “calculator” app that runs in the client and uses the FlexCel engine to calculate expressions This was the first part of a 2-part series. In this one, we investigated client-side Blazor. In the next part, we will play a little with server-side Blazor.

Read More