Noutați

TMS WEB Core v1.6 beta brings the pas2js v2.0 quantum leap

The past couple of months and especially weeks have been a nerve-racking ride! Nerve-racking because the scope of introducing the new pas2js v2.0 compiler in TMS WEB Core is huge. Our code library that works with TMS WEB Core and the pas2js compiler meanwhile got huge, so there is a lot of testing and polishing involved to ensure everything continues to work smoothly with the new compiler. But also nerve-racking because the new compiler offers so many exciting features we are eager to take advantage of.But well, we think we have reached the level of stability where we can offer a beta release for our TMS WEB Core users that should work smooth out of the box and ready to take advantage of the new amazing features! The new pas2js v2.0 compiler is nothing short of amazing and a quantum leap forward for Object Pascal developers to tackle the most challenging rich web client application developments! And it is not just the compiler itself, it is of course also the supporting RTL for features such as generics. What an honor and experience to work so closely together with the two masterminds of the project Mattias Gaertner and Michael Van Canneyt to bring TMS WEB Core with pas2js v2.0 to life. The list of new features in the pas2js v2.0 compiler is long and can be consulted in detail here but let me highlight the major new capabilities: Generics Attributes Class constructors Resource strings Async procedure decorator Await support JavaScript promises support Best of all, we expect the introduction of this huge step forward to be smooth. All our demos for example continue to work without changing any line of code. Unless you did perhaps very specific things directly with underlying JavaScript objects or event handlers, the new version should be fully backwards compatible. Before moving to a final release of TMS WEB Core v1.6.0.0, we want to give you, users of TMS ALL-ACCESS or TMS WEB Core sufficient time to test the new version, give your feedback, address issues in case these would arise. You can find the beta download now on the “My Products” page on your account on our website. This beta version can be used from Delphi XE7 to Delphi 10.4 Sydney as well as Lazarus 2.0.10. At the same time our team is feverishly working on bringing the pas2js v2.0 compiler also to TMS WEB Core for Visual Studio Code. The challenge is even bigger here as we need to test and validate everything on 3 different operating systems as you can use TMS WEB Core for Visual Studio Code directly on Windows, macOS and Linux to build Object Pascal based web client applications. Expect also here that a beta will follow shortly! Oh, and by the way, TMS WEB Core v1.6 will be get the name Pesaro. Pesaro is the town along the legendary Mille Miglia 1955 race after Rimini that was the name of version v1.5. So, our race with TMS WEB Core enjoys the beautiful scenery of Pesaro.

Read More

GXT 4.0.4 Patch Release is Available

December 8, 2020 | Kirti Joshi The Sencha team would like to announce the availability of GXT 4.0.4 software patch release for our customers on maintenance. This release addresses more than a dozen customer reported tickets spanning improvements in the grid component, layout, selection, and more. Review the full list in our GXT 4.0.4 Release Notes and download this latest release from the Sencha support portal. If you have any questions, get in touch with our support team.    Developing Apps in Java?   Then GXT might be the right choice for you! GXT is a comprehensive Java framework for building web apps using Google Web Toolkit. Easily write code in Java and compile it into highly optimized HTML5 code. Try GXT for Free The fully featured GXT is available for you to try for 30-days, free of charge! See how the complete library of 140+ UI components can speed your development cycles! Download GXT 30-day free trial

Read More

A Peek at the Many New and Exciting Data Grid Features in Ext JS 7.4

The entire Sencha team is hard at work getting Ext JS 7.4 release complete and in your hands. We plan to have this out pretty soon, but wanted to take this opportunity to provide you with the details of the several new features (yes, there are many, and you won’t be disappointed!) that the release brings.*Please note that features are not committed until completed and GA released.* So here we go … Ext JS 7.4 includes new Data Grid features and addresses some solid improvements and enhancements to both Classic and Modern Toolkits. Multi-level Grouping Group data on multiple levels with the advanced Multi-Grouping feature. Easily add one or more desired fields to the group and the Grid Panel can display the data based on that grouping. Here is an example of a header menu that allows users to change grouping on the fly. Multi-level Grouping for Ext JS Classic Toolkit   Multi-level Grouping for Ext JS Modern Toolkit   Grouping Panel The Grouping Panel allows users to drag-and-drop the desired columns to the grouping panel section. Use this feature to quickly perform operations such as sort, remove, move or change the order of the grouped fields. Grouping Panel for Ext JS Classic Toolkit   Grouping Panel for Ext JS Modern Toolkit   Summaries for Grid Groups and Total The new Grid Summary feature will allow users to define functions for aggregation such as Sum, Min, Max, Average, Count, and more for each column. The feature also allows users to set the position of the group summary for easy viewing.Available for Classic and Modern Toolkit   Filterbar We are adding a new docked bar under the grid headers which will allow the filtered fields and configurations for each column to be easily viewable. The feature will be present in both toolkits. New KitchenSink Examples We’ll be adding new Grid examples to demonstrate how to configure and use the cool new Grid features in Ext JS 7.4. Coming soon! Other Enhancements Ext JS 7.4 will address over a dozen other enhancements and improvements that will benefit all our users. We know you are eagerly waiting to try out these new enhancements. Our team is working hard to get these coveted Grid features to you.*Please note that features are not committed until completed and GA released.*Stay tuned for release updates coming soon! New Data Grid Examples In the meantime, check out this brand new collection of interactive Grid examples and see how you could use them to enhance your application. Grid Classic Examples                         Grid Modern Examples If you haven’t already, check out the performant Ext JS Grid in action with this Interactive Grid Performance Analyzer Haven’t tried Ext JS Data Grid yet? Try a 30-day free trial of Ext JS and check out the power and scalability of the Ext JS Grid for yourself. Ext JS trial is available via public npm or through an easy zip download. Get started and build your first app in 3 easy steps. Download Ext JS 30-day free trialGet a snapshot of the Grid FeaturesExplore More Learning Materials Lock in Your 7.4 Presale Discount Time is ticking, don’t wait to grab your presale discount. Contact your account manager to unlock you discount or get […]

Read More

Easily Use A Popular Python Image Library In A Delphi Windows GUI App

procedure TForm1.Button2Click(Sender: TObject); var   _im : Variant;   _stream : TMemoryStream;   _dib : Variant;   pargs: PPyObject;   presult :PPyObject;   P : PAnsiChar;   Len : NativeInt; begin   if (Image1.Picture.Graphic = nil) or Image1.Picture.Graphic.Empty then     raise Exception.Create(‘You must first select an image’);   PythonEngine1.ExecStrings(Memo1.Lines);   _im := MainModule.ProcessImage(ImageToPyBytes(Image1.Picture.Graphic));   if not chkUseDC.Checked then   begin     // We have to call PyString_AsStringAndSize because the image may contain zeros     with GetPythonEngine do begin       pargs := MakePyTuple([ExtractPythonObjectFrom(_im)]);       try         presult := PyEval_CallObjectWithKeywords(             ExtractPythonObjectFrom(MainModule.ImageToBytes), pargs, nil);         try           if (P = nil) or (PyBytes_AsStringAndSize(presult, P, Len) 0) then begin             ShowMessage(‘This does not work and needs fixing’);             Abort;           end;         finally           Py_XDECREF(pResult);         end;       finally         Py_DECREF(pargs);       end;     end;       _stream := TMemoryStream.Create();     try       _stream.Write(P^, Len);       _stream.Position := 0;       Image1.Picture.Graphic.LoadFromStream(_stream);     finally       _stream.Free;     end;   end   else   begin     Image1.Picture.Bitmap.SetSize(Image1.Width, Image1.Height);     _dib := Import(‘PIL.ImageWin’).Dib(_im);     Image1.Picture.Bitmap.SetSize(Image1.Height, Image1.Width);     _dib.expose(NativeInt(Image1.Picture.Bitmap.Canvas.Handle));   end; end;

Read More

Stunning Cross-Platform FireMonkey App Profile Templates Available For Android And iOS From GetIt

This FireMonkey UI template includes three different designs for implementing an app profile screen in a multi-device application. As you can see, these are the app profile Delphi/C++ Builder FireMonkey samples. From these sample app profile demos, you can learn how to design and build beautiful responsive FireMonkey applications by just dragging and dropping the components. Sample features Available on Delphi and C++ Builder TFrame TLayout TRectangle  and other components You can download these samples from GetIt Package Manager Also, be sure to check out other FireMonkey and VCL sample applications on GetIt

Read More

Delphi and C++Builder 10.4.2 Beta Invite for Update Subscription Customers

We are pleased to invite all of our RAD Studio customers with an active subscription to the NDA beta program for Embarcadero’s 10.4.2 release of Delphi, C++Builder, and RAD Studio, codenamed “Hunter”. RAD Studio 10.4.2 builds on the great features introduced in RAD Studio 10.4 and 10.4.1, and adds new features and enhancements throughout the product.  To learn more about the capabilities we have planned for the 10.4.2 release, please refer to the RAD Studio November 2020 Roadmap PM Commentary blog post (please note that features mentioned in the blog post are not committed until completed and GA released). After you have joined the beta, you will receive additional documentation detailing the features of each beta build. How to join:  To participate in the beta, please provide your name and the email address associated with your Update Subscription (the email you used to register the product) using this form by Tuesday, December 15, 2020. Once you’ve provided your email address, you will receive a follow-up email in the second half of December with a link to electronically sign the Hunter Beta NDA. After signing the NDA, you will be provided with the information needed to participate in the 10.4.2 beta. Please note that 10.4.2 beta builds cannot be installed on the same machine as your current 10.4 or 10.4.1 Sydney installation (also, we generally recommend against installing beta versions on a production machine).   Not current on subscription but interested in joining the 10.4.2 beta? Contact your Embarcadero sales representative or reseller partner to renew your subscription and be invited to join the beta program. 

Read More

Modernize Your Multi-Device Fire Monkey App Easy To Use Card View Wizard Layout Template

User experience is the key thing to be considered while building a modern Multi-Device application. Lots of layout templates were available in GetIt Package Manager to design responsive, ultra-modern, cross-platform FireMonkey applications. This post helps to understand one of the FireMonkey Layout templates the Card View Wizard. Card View Layout Template is a Fire Monkey template that incorporates a number of card view pages that can be navigated forward and backward though one would use this as an in-app tutorial. 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 Sample Projects in Categories-> Card View Wizard 1.0 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. GetIt – Card View Wizard 1.0 Card View Wizard Sample App Implementation Details: Car View Wizard Sample app contains, a TTabControl with a list of TabItems in it. Each TabItem is placed with an instance of TFrameCard defined in uCardFrame.pas. TFrameCard can set CardTitle, CardText, and Configure card with CardLayout Text image. procedure TMainForm.FormCreate(Sender: TObject); begin {$IFDEF FIRSTSET} // first set FrameCard1.SetCardTitle(WIZARD_TITLE_1); FrameCard1.SetCardText(WIZARD_TEXT_1); FrameCard1.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); FrameCard2.SetCardTitle(WIZARD_TITLE_2); FrameCard2.SetCardText(WIZARD_TEXT_2); FrameCard2.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); FrameCard3.SetCardTitle(WIZARD_TITLE_3); FrameCard3.SetCardText(WIZARD_TEXT_3); FrameCard3.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); FrameCard4.SetCardTitle(WIZARD_TITLE_4); FrameCard4.SetCardText(WIZARD_TEXT_4); FrameCard4.SetNextButtonText(WIZARD_NEXT_BUTTON_4); FrameCard4.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); {$ENDIF} WizardTabControlChange(Sender); end; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 procedure TMainForm.FormCreate(Sender: TObject); begin   {$IFDEF FIRSTSET}   // first set   FrameCard1.SetCardTitle(WIZARD_TITLE_1);   FrameCard1.SetCardText(WIZARD_TEXT_1);   FrameCard1.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage);     FrameCard2.SetCardTitle(WIZARD_TITLE_2);   FrameCard2.SetCardText(WIZARD_TEXT_2);   FrameCard2.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage);     FrameCard3.SetCardTitle(WIZARD_TITLE_3);   FrameCard3.SetCardText(WIZARD_TEXT_3);   FrameCard3.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage);     FrameCard4.SetCardTitle(WIZARD_TITLE_4);   FrameCard4.SetCardText(WIZARD_TEXT_4);   FrameCard4.SetNextButtonText(WIZARD_NEXT_BUTTON_4);   FrameCard4.ConfigureCard(TCardButton.Inner, TCardBGImage.Inner, TCardLayout.TextImage); {$ENDIF}     WizardTabControlChange(Sender); end; When the WizardTabControlChange event occurs the respective card is displayed with title text and background image. procedure TMainForm.WizardTabControlChange(Sender: TObject); var I: Integer; begin for I := 0 to WizardTabControl.TabCount-1 do begin if TTabItem(WizardTabControl.Tabs[I]).TagObject is TRectangle then begin TButton(TTabItem(WizardTabControl.Tabs[I]).TagObject).Visible := False; end; end; if WizardTabControl.TabIndex>-1 then if WizardTabControl.ActiveTab.TagObject is TRectangle then begin TButton(WizardTabControl.ActiveTab.TagObject).Visible := True; end; end; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 procedure TMainForm.WizardTabControlChange(Sender: TObject); var I: Integer; begin   for I := 0 to WizardTabControl.TabCount–1 do     begin       if TTabItem(WizardTabControl.Tabs[I]).TagObject is TRectangle then         begin           TButton(TTabItem(WizardTabControl.Tabs[I]).TagObject).Visible := False;         end;     end;   if WizardTabControl.TabIndex>–1 then     if WizardTabControl.ActiveTab.TagObject is TRectangle then       begin         TButton(WizardTabControl.ActiveTab.TagObject).Visible := True;       end; end; Card View Wizard 1.0 Demo Be sure to check out all the available sample applications here!

Read More

Learn About Using Alignment Support In C++Builder For Robust Windows Development

The alignment requirement of a type is a divisor of its size. For example, a class with size 16 bytes could have an alignment of 1, 2, 4, 8, or 16, but not 32. (If a class’s members only total 14 bytes in size, but the class needs to have an alignment requirement of 8, the compiler will insert 2 padding bytes to make the class’s size equal to 16.). C++11 standard intends to extend the standard language and library with alignment-related features. Querying the alignment of a type The alignment requirement of a type can be queried using the alignof keyword as a unary operator. The result is a constant expression of type std::size_t, i.e., it can be evaluated at compile time. #include int main() { std::cout #include int main() {     std::cout << “The alignment requirement of int is: “ << alignof(int) << ‘n’; } Possible output : The alignment requirement of int is: 4 Controlling alignment The alignas keyword can be used to force a variable, class data member, declaration or definition of a class, or declaration or definition of an enum, to have a particular alignment, if supported. It comes in two forms: alignas(x), where x is a constant expression, gives the entity the alignment x, if supported.alignas(T), where T is a type, gives the entity an alignment equal to the alignment requirement of T, that is, alignof(T), if supported. If multiple alignas specifiers are applied to the same entity, the strictest one applies. In this example, the buffer buf is guaranteed to be appropriately aligned to hold an int object, even though its element type is unsigned char, which may have a weaker alignment requirement. alignas(int) unsigned char buf[sizeof(int)]; new (buf) int(42); alignas(int) unsigned char buf[sizeof(int)]; new (buf) int(42); alignas cannot be used to give a type a smaller alignment than the type would have without this declaration: alignas(1) int i; //Il-formed, unless `int` on this platform is aligned to 1 byte. alignas(char) int j; //Il-formed, unless `int` has the same or smaller alignment than `char`. alignas(1) int i; //Il-formed, unless `int` on this platform is aligned to 1 byte. alignas(char) int j; //Il-formed, unless `int` has the same or smaller alignment than `char`. Head over and check out more information about C++ alignment support in C++Builder.

Read More

Which App Security & Quality Analytics Should You Be Tracking?

Published December 2, 2020 WRITTEN BY THE KIUWAN TEAMExperienced developers, cyber-security experts, ALM consultants, DevOps gurus and some other dangerous species. As business management expert Peter Drucker once put it: “If you can’t measure it, you can’t improve it.” This quote feels right in place in the world of application security. Many CISOs are finally starting to give SAST tools and other approaches the attention they deserve. However, the only way to know if your approach works is by using app security and quality analytics.  While there are many security metrics you can track and assess, choosing the ideal ones for your company is of paramount importance. It’s the best way for CISOs, developers, and other stakeholders to gauge the application’s effectiveness and improve its efficiency. Why Application Security Analytics Matter Arguably the most important part of any application security plan is determining the key data analytics to track. For instance, many CISOs want to see a drop in the number of new malware attacks targeting an application (making this an important analytic to track). A drop in this figure over time shows an improvement in secure coding practices within the team. Allowing your security professionals to have access to real-time analytics is also important. It goes a long way to improving their efficiency.  Some of the analytics they should access with ease includes: Data regarding the type of threats being identified How they are discovered And the time it takes to remedy them.  Another thing to remember is that there is both direct and indirect analytics you can track. Direct analytics gauge the security of the program itself, such as the exact number of known threats. Indirect analytics go above and beyond the program and, instead, target practices, tools, and people. A blend of direct analytics and indirect analytics paints the most accurate picture of how your application security (AppSec) tools work. Without these analytics, CISOs will attempt to secure their programs blindly, with limited capacity to deliver quality business outcomes. Six AppSec Analytics To Improve Application Security & Quality 1. Total number of application threats and their severity This is arguably the most vital application security and quality metric for your organization.  It’s prudent to know the exact number of weaknesses present in an app, and more importantly — just how severe each threat is. Severity depends on the effect the weakness can have on the app (and the company at large) and how often it is likely to happen. The best way to pinpoint the biggest weaknesses is to leverage the outcomes from Dynamic Application Security Testing (DAST) tools and Static Application Security Testing Tool (SAST) tools like Kiuwan. Click here to read more about these testing tools. SAST tools single out potential threats in the source code, while DAST tools show you which of these weaknesses can actually lure attackers. Leveraging results from both SAST and DAST tools will enable you to draft a list of the weaknesses that pose the most significant threat to the program. Better yet, your team can use these analytics to identify issues that require immediate remediation. 2. Number of new threats detected In agile software development, new releases and updates are quite common. It’s vital to know the exact number of new threats discovered when a program is deployed. This analytic helps CISOs keep better track […]

Read More

Learn How To Build An Iterator Python Type For Delphi In This Windows GUI App

We are aware of how to use TStringList in Delphi. we learned how to create a Python type using Delphi classes. Thinking How to create an iterator in Delphi Which holds python objects? This post guide you to create a Python Type that contains a list of strings(python string objects) similar to TStringList. And a String List Iterator Python Type In Delphi to iterate the StringList Python Type easily in Delphi with Python4Delphi Sample App. Python4Delphi Demo28 Sample App shows how to create a StringList Python type, StringList Iterator Python Type in a Python Module, Import the module, and Iterator Python Types in a python script, create a Stringlist object and access some of the service routines like Iter, IterNext, etc. You can find the Demo28 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 Demo28 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 Demo28 sample project from the extracted repository ..Python4DelphiDemosDemo28.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 the TPythonEngine DllName property. PythonGUIInputOutput1 provides a conduit for routing input and output between the Graphical User Interface (GUI) and the currentlyexecuting Python script. pmP4D with a Module name p4d is created. Python Type (ptStringList) with Type Name TStringList and Python type (ptStringListIterator) with Type Name TStringListIterator is created. Both Python Types Module Property is assigned with pmP4D. Each Python Type PyObjectClass is initialized with Delphi Python Type Class as shown below. procedure TForm1.ptStringListCreate(Sender: TObject); begin with Sender as TPythonType do PyObjectClass := TPyStringList; end; procedure TForm1.ptStringListIteratorCreate(Sender: TObject); begin with Sender as TPythonType do PyObjectClass := TPyStringListIterator; end; procedure TForm1.ptStringListCreate(Sender: TObject); begin   with Sender as TPythonType do     PyObjectClass := TPyStringList; end;   procedure TForm1.ptStringListIteratorCreate(Sender: TObject); begin   with Sender as TPythonType do     PyObjectClass := TPyStringListIterator; end; In this sample, TPyStringList overrides the Iter, Basic service of TPyObject, and Sequence Services such as SqLength, SqItem, SqAsItem. Using RegisterMethods exposed an Add method(Using this a string can be added to the string list). Used PyArg_ParseTuple to retrieve the arguments passed in python scripts. This class also has the property to return TStringList. function TPyStringList.add(args: PPyObject): PPyObject; var _obj : PPyObject; begin with GetPythonEngine do begin // We adjust the transmitted self argument Adjust(@Self); if PyArg_ParseTuple( args, ‘O:add’,@_obj ) 0 then begin Result := PyLong_FromLong(Strings.Add(PyObjectAsString(_obj))); end else […]

Read More