Noutați

Apple Platforms Patch for RAD Studio 10.4.1

We have just released a new patch focused on improving RAD Studio 10.4.1 support for XCode 12, iOS 14 and macOS 11 Big Sur (Intel): these are operating systems and tools which were not available when 10.4.1 shipped. Specifically, the patch offers fixes for a Delphi exception issue on macOS 11 Big Sur Intel (which was also affecting PAServer when running on that platform, meaning this patch includes a new version of PAServer), SDK import from Xcode 12, and debugging applications on an iOS 14 device. Notice that new ARM-based Macs running macOS 11 Big Sur can execute macOS apps built for the Intel platform, including those built with Delphi 10.4.1, via the Apple Rosetta 2 compatibility layer. The patch can be installed via GetIt (with automatic installation via a deferred package, applied as you restart RAD Studio) or a direct download from my.embarcadero.com (available shortly) and manual installation. In both cases you’ll have to copy the PAServer for macOS installer to your Mac and install it manually. The readme file includes additional information and details.

Read More

TMS WEB Core embraces ever more powerful PWA support from Google Chrome

There is no doubt that Google is and remains the driving force behind the fast evolving web world. And with Microsoft having adopted the Google Chromium engine in its latest and new default Windows 10 operating system browser, it is clear that the browser gets ever more powerful with each release. While every Chrome update sees a lot of enhancements, the release 86 introduced perhaps another disruptive feature: the file system access API! Yes, you read this correct, file system access API or in other words, access to the local file system from a PWA (Progressive Web App)! Of course, Google took the necessary measures to look over security. I can imagine you wouldn’t want to be directed to some URL and the web application at this URL will suddenly start scanning your local hard drive. All local file access remains initiated by user interaction and user consent! User consent prompt to view files in a folder What the File System Access API actually provides is: open local text or binary files save to a local text or binary files use the operating system file dialog to pick a file use the operating system file dialog to save to a file get access to a folder and its files/subfolders use the operating system to select a folder associate file types with PWA apps Now, you will understand that as we read the news, we were eager to investigate integration capabilities in a TMS WEB Core PWA and reflect on bringing easy to use Pascal language wrapper classes to take advantage of this new functionality. So, in our labs, we created a support unit for local file handling : WEBLib.LocalFiles. In this unit, three classes are available: TTextFile, TBinaryFile and TFolder. Working with local text files TTextFile offers following public interface TTextFile = class(TObject) public procedure OpenFile; overload; procedure OpenFile(AOpenFile: TOpenTextFileProc); overload; procedure SaveFile; overload; procedure SaveFile(ASaveFile: TSaveFileProc); overload; procedure SaveAsFile; overload; procedure SaveAsFile(ASaveFile: TSaveFileProc); overload; property Text: string; property FileName: string; property OnFileOpen: TNotifyEvent; property OnFileSave: TNotifyEvent; end; As you can see there are overloads for the OpenFile, SaveFile and SaveAsFile methods. In one version of the methods, there is an anonymouse method that is called when the action on the file completed and the other versioni will signal completion via an event. To use the class to open a file, we can write: begin ATextFile := TTextFile.Create; ATextFile.OpenFile(procedure(AText: string) begin WebMemo1.Lines.Text := AText; end); end; If the text was modified in the memo control, it can be saved with following code working on the same instance of the TTextFile object: begin ATextFile.Text := WebMemo1.Lines.Text; ATextFile.SaveFile(procedure begin ShowMessage(‘File succesfully saved’); end); end; As you can see, it becomes extremely easy for Pascal developers to take advantage of the file system access API in the browser! Working with local binary files For binary files, a similar class TBinaryFile was created with the important different from the TTextFile that here the data read or to be saved is of the type TJSArrayBuffer. TJSArrayBuffer is the Object Pascal wrapper for the JavaScript ArrayBuffer which basically is an array of bytes. The interface of TBinaryFile is the same as TTextFile except that it exposes public property TBinaryFile.Data: TJSArrayBuffer. To demonstrate its use, we can open a local image file with the following code: var […]

Read More

Double vector graphics, double quality

uses AdvTypes; procedure TForm1.LoadSVG; begin Image1.Picture.LoadFromFile(‘nature.svg’); end; uses AdvPDFLib, Types; procedure TForm1.Button1Click(Sender: TObject); var p: TAdvPDFLib; begin p := TAdvPDFLib.Create; try p.BeginDocument(‘SVGToPDF.pdf’); p.NewPage; p.Graphics.DrawImageFromFile(‘nature.svg’, RectF(50, 50, p.PageWidth – 50, 500)); p.EndDocument(True); finally p.Free; end; end; When zooming in, you’ll notice that the quality is not affected because of the native vector graphics used inside the PDF document.

Read More

Beautiful Responsive Home Screen UI Templates For FireMonkey Available For Free Via GetIt In The IDE

New FireMonkey developers tend to make unresponsive and bad user experience. For this, we should show guidelines and sample projects to learn how to create stunning FireMonkey projects.  This FireMonkey UI template includes three different designs for implementing an app home screen in a multi-device application.  You can get these sample UI templates from GetIt easily!  What can you learn from these samples? Use cases of TFrame Tab Controls Blur backgrounds Menu and Navigation  Simple & grid layouts and many more Be sure to check out these samples to learn more about FireMonkey app designing guidelines and FireMonkey multi-device responsive application designing! Be sure to check out other resources on building FireMonkey applications:

Read More

Ultimate Compression Toolkit For Delphi And C++ Builder Developers

procedure TAbZipperTests.CreateAndTestBasicZipFile; var   ExtractDir, TestFileName : string;   AbUnZip : TAbUnZipper; begin   // Test with Setting BaseDirectory and not specifying AutoSave   TestFileName := TestTempDir + ‘basic.zip’;   if FileExists(TestFileName) then     DeleteFile(TestFileName);   Component.FileName := TestFileName;   Component.BaseDirectory := TestFileDir;   Component.AddFiles(‘*.*’,faAnyFile);   Component.Save;   Component.FileName := ”;   CheckFileExists(TestFileName);     AbUnZip := TAbUnZipper.Create(nil);   try     AbUnZip.FileName := TestFileName;     // Clean out old Directory and create a new one.     Extractdir := TestTempDir + ‘extracttest’;     if DirectoryExists(ExtractDir) then       DelTree(ExtractDir);     CreateDir(ExtractDir);     // Extract Files.     AbUnZip.BaseDirectory := ExtractDir;     AbUnZip.ExtractFiles(‘*.*’);     // Compare Extracted Files     CheckDirMatch(TestFileDir,ExtractDir);   finally     AbUnZip.Free;   end;   DeleteFile(TestFileName); end;

Read More

Archaeological Museum Utilizes Powerful RAD Server And Beacon Fence Solution With Delphi

Miyazaki Prefectural Saitohara Archaeological Museum has built an app for smartphones, “Saitohara Archaeological Expo Navi,” which provides navigation in the museum, guidance on exhibits, etc. in multiple languages ​​using solutions provided by Embarcadero and Marubeni Information Systems. did. This solution consists of a power-saving beacon that emits radio waves (using “rapiNAVI Air2” manufactured by Marubeni Information Systems) and Embarcadero’s software development function “Beacon Fence” that detects the position using this beacon. At the Saitohara Archaeological Museum, you can use the in-house navigation system “Saitohara Archaeological Expo Navi” that utilizes beacons. With this system, you can check the current location of the museum on your smartphone, and read the explanation of the exhibits in front of you in four languages: Japanese, English, Chinese, and Korean. In this session, we will introduce how this system was built at the museum, along with an overview of the system and the features of RAD Studio / Delphi + BeaconFence used. Case Study http://forms.embarcadero.com/saitobaru-case Website http://saito-muse.pref.miyazaki.jp/web/english/index.html Screenshot Gallery

Read More

Learn To Use Events To Build Python GUI Apps For Windows With Delphi And C++

An event links an occurrence in the system with the code that responds to that occurrence. The occurrence triggers the execution of a procedure called an event handler. The event handler performs the tasks that are required in response to the occurrence. Events allow the behavior of a component to be customized at design-time or at run time. Do you want to trigger and handle an event similar to Delphi events? Python4Delphi provides a mechanism to do that. This post will guide you on how to create events using Python4Delphi Components. Python4Delphi Demo21 Sample App shows how to create a Module, Python type, and add an event to it and define the event, Import the module and Python Type in a python script, and access the created event. You can find the Demo21 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 Demo21 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 create events using the Events property. After creating the event with a name, its handler can be defined by clicking the OnExecute method which takes the sender, PythonObject, and a variable parameter result as argument. TPythonType: It’s inherited from TGetSetContainer class contains a set of APIs to create, manage a Python Type in Delphi. Similar to TPythonModule, this also has Events property. TPyPoint Delphi class implementing a new Python type. It must derive from TPyObject or one of its descendants. Then it must override some methods, like the constructors, the RegisterMethods, and the type services’ virtual methods. 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 Demo21 sample project from the extracted GitHub repository ..Python4DelphiDemosDemo21.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 Module name spam is created. Created an eventPythonModule1.Events[0]. And on execute event(PythonModule1Events0Execute) defined with below code. procedure TForm1.PythonModule1Events0Execute(Sender: TObject; PSelf, Args: PPyObject; var Result: PPyObject); begin with GetPythonEngine do begin Result := PyUnicodeFromString(‘Hello world !’); end; end; procedure TForm1.PythonModule1Events0Execute(Sender: TObject; PSelf,   Args: PPyObject; var Result: PPyObject); begin   with GetPythonEngine do   begin     Result := PyUnicodeFromString(‘Hello world !’);   end; end; PythonType1 during initialization, associate PyObjectClass with the created TPyPoint class. Created an event PythonType1.Events[0]. And on execute event(PythonType1Events0Execute) defined with below code. procedure TForm1.PythonType1Events0Execute(Sender: TObject; PSelf, Args: PPyObject; var Result: PPyObject); var dx, dy : Integer; Instance : TPyPoint; begin with GetPythonEngine do begin // Convert the PSelf Python object to a Delphi instance pointer. Instance := TPyPoint(PythonToDelphi(PSelf)); // first we extract the arguments if PyArg_ParseTuple( args, ‘ii:Point.Offset’,@dx, @dy ) 0 then begin // if it’s ok, then we call the method […]

Read More

From the GM’s Desk November 2020

Kegan Blumenthal,GM of Sencha Inc. While 2020 has been turbulent, to say the least, I am proud to say the Sencha team has been proceeding business as usual; sticking to the original roadmap and even pushing out new products and initiatives along the way. As we head into the end of the year and on to 2021, we want to do everything we can to help empower your teams’ velocity. We’re happy to announce the End of Year Incentives beginning today until 12/31/20. There isn’t a one-size-fits-all approach but we’re more flexible than ever and eager to help where we can. Before I get into that, I’d like to highlight some of the progress we’ve achieved this year so far: Recent Release Sencha Ext.NET is a new product targeted toward the ASP.NET developer community. Sencha has partnered with the Ext.NET team to provide this offering through the Sencha line of products .Ext.NET is an advanced ASP.NET Core component framework that incorporates the Ext JS library to build cross-browser, blazing fast web applications. Ext.NET combines the two server and client-side technologies (Ext JS & ASP.NET) to provide the UI controls for over 140 UI components including some amazing looking themes and is available in three editions. Free Tool: WebTestIt WebTestIt provides users the tools to create and build tests with popular web testing frameworks such as Selenium and Protractor. Aimed at serving the broader web test automation ecosystem, WebTestIt significantly reduces the effort associated with test management and increases the efficiency of your project’s test automation. And best of all, it’s completely FREE to use! Download it today at https://www.sencha.com/products/webtestit/download/ Upcoming Ext JS 7.4 Release The Sencha team is very excited about the upcoming 7.4 release, the biggest Sencha release in the last 12 months. For the Sencha Ext JS 7.4 release, targeted for this quarter, we plan to add some very exciting features to our best-in-class component, the grid. This includes the following features: Multi-level grouping: Advanced multi-level grouping provides data grouping on multiple levels Grouping panel: Easily drag and drop columns for grouping Summaries for groups and total: Quickly define functions for aggregation such as sum, min, max count, and more per column Filterbar: Quickly filter data in the grid using the new grid header filter bar container *Please note that features are not committed until completed and GA released.* Upcoming GXT Release The GXT 4.0.4 release, targeted for this quarter, includes a number of quality improvements for customer reported issues.Please note that features are not committed until completed and GA released. Get your End of Year Incentives! Our licensing options are flexible to fit your team. Whether you have 1 or multiple teams, 1 or dozens of developers, we can tailor a plan to fit your unique needs. We even have the option to provide an Annual plan or Perpetual license making it even more customizable for you. Additionally, we have introduced a Sencha Ext JS UNLIMITED plan to support organization-wide development with an easier license activation mechanism and seat management. To unlock your personal incentives, please reach out to your Account Manager (or me!) as soon as possible: Andy Serda (US Manager/OEMs): [email protected]Nathan Harper (West Coast US): [email protected]James Walker (East Coast US): [email protected]Lynn Geronimo (EMEA): [email protected]Patricia Pena (DACH): [email protected]James Cho (APAC): [email protected]

Read More

Flexible Way To Set And Get Variant Array Between Delphi and Python For Building Windows Apps

rocedure TForm1.Button1Click(Sender: TObject);     procedure DisplayArrayVar( V : Variant );   var     i, j : Integer;     item : Variant;     s : String;   begin     Memo2.Lines.Add(‘Displaying a variant array generated from a Python sequence:’);     for i := VarArrayLowBound( V, 1 ) to VarArrayHighBound( V, 1 ) do       begin         item := V[i];         for j := VarArrayLowBound( item, 1 ) to VarArrayHighBound( item, 1 ) do           begin             s := item[j];             Memo2.Lines.Add(Format(‘(%d, %d) = %s’,[i, j, s]));           end;       end;   end;   var   ComArray : Variant; begin   ComArray := VarArrayCreate([0, 3, 0, 2], varVariant);   ComArray[0, 0] := 1;   ComArray[0, 1] := 1.1;   ComArray[0, 2] := ‘a’;   ComArray[1, 0] := 2;   ComArray[1, 1] := 2.2;   ComArray[1, 2] := ‘b’;   ComArray[2, 0] := 3;   ComArray[2, 1] := 3.3;   ComArray[2, 2] := ‘c’;   ComArray[3, 0] := 4;   ComArray[3, 1] := 4.4;   ComArray[3, 2] := ‘d’;   PythonModule1.SetVarFromVariant( ‘L’, ComArray );   PythonEngine1.ExecStrings(Memo1.Lines);   DisplayArrayVar( PythonModule1.GetVarAsVariant( ‘L’ ) ); end;

Read More

RAD Studio 10.4 Launch Webinar Replay And Feature Round Up For Building Powerful Native Cross-Platform Apps

RAD Studio is the ultimate IDE with features both C++ and Delphi developers love to design, code, debug and test for cross-platform platform with native performance. Supported Platforms: Windows, iOS, macOS, Linux, and Android (some platforms Delphi only) Major Delphi Code Insight Redesign: The largest and best improvement to Delphi’s code tooling in many years, RAD Studio 10.4 provides Code Insight using a Delphi implementation of the Language Server Protocol (LSP). LSP is a technique for calculating results for code completion, navigation, or similar in a separate process. This means that the IDE will never block while completing and Code Insight will provide accurate results. You can also use code completion while debugging. 10.4 provides a much enhanced developer productivity experience when working with large projects with millions of lines of code. Accurate Error Insight results (red squiggles) and errors shown in the structure view. Delphi – Custom Managed Records: A key language addition to the Delphi language, the Delphi record type now supports custom initialization, finalization, and copy operations. Developers now have the ability to customize how records get created, copied, and destroyed, by writing the code to be executed at the various steps. This adds additional power to records in Delphi, a construct used to achieve better efficiency compared to classes. Unified Memory Management for Delphi and C++: Delphi memory management is now unified across all supported platforms – mobile, desktop, and server – using the classic implementation of object memory management. Compared to Automatic Reference Counting (ARC), this offers better compatibility with existing code and simpler coding for components, libraries, and end-user applications. The ARC model remains for string management and interface type references for all platforms. For C++, this change means that the creation and deletion of Delphi-style classes in C++ follow normal memory management just like any heap-allocated C++ class, significantly reducing complexity. New C++ Builder Features: Expanded C++ libraries support : Ported numerous popular C++ libraries to C++Builder, providing optimized support for use within C++Builder. This includes libraries such as ZeroMQ, SDL2, SOCI, libSIMDpp, and Nematode, as well as others already supported such as Eigen, available for download through the GetIt Package Manager. Win 64-Debugging and Linker for C++ : A new debugger for Windows 64-bit for C++. Based on LLDB, this debugger introduces significant stability improvements when debugging 64-bit applications, as well as a key new feature assisting evaluating and inspecting types like C++ and Delphi strings plus STL collections. Toolchain performance and quality improvements: A large number of STL improvements from Dinkumware, Several key RTL methods, Several improvements to CMake support. VCL Styles for High DPI: The VCL Styles architecture has been extended to support High DPI and 4K monitors. All UI controls on the VCL form are now automatically scaled for the proper resolution of the monitor the form is displayed on. The style API has been fully revised to support high DPI styles. Updated a large number of our built-in and premium VCL styles to provide support for the new High-DPI style mode, letting you design visually stunning applications for any monitor. VCL Per Control Styling -VCL developers can now use multiple VCL styles in different forms within a single application or even different visual controls that are on the same form. This also enables you to use third-party unstyled […]

Read More