Tips

6 practical examples on how to use macros

Automatically translated from English

4D 18 R5 introduced form macros. They can be incredibly useful, for example, by providing an ideal way to save time on repetitive tasks. In this blog post, we’ll show you some basic examples to learn more about how macros work and the possibilities they offer. All of the following examples are available on GitHub.

Product

Automate repetitive tasks and more with form macros!

Automatically translated from English

If you’re a fan of macros in the code editor, then 4D v18 R5 has some good news for you …  because now macros are also available in the form editor!

Let me start by telling you how useful macros can be for you. Have you ever needed to use formatting or naming rules in your application, then apply them to each new form? Or maybe you’ve had to work on existing forms created by someone else, and always need to do the exact same checks and analyses before getting started. If you’ve ever encountered one of these scenarios, then 4D v18 R5 is for you because it gives you the ability to create macros and save time on predictable, repetitive tasks.

Product

Coder-friendly syntax for class functions and methods

Automatically translated from English

Using $1, $2, and $n variables in your code not only makes the code less readable, it can also increase confusion since the human brain can find it difficult to remember what these variables correspond to. The solution is to create a variable with an understandable name and assign it the value of $1, $2, or $n.

4D v18 R5 has good news, you can now name your parameters when declaring:

  • a project method,
  • a trigger
  • a database method
  • a form method
  • a constructor of a class
  • a function of a class.

 

Let’s see how!

Product

ORDA – Improve your API with function scope

Automatically translated from English

4D v18 R4 and ORDA made it possible for you to create high-level class functions above the data model. This allows you to write business-oriented code to hide complexity, reduce errors, and speed up the development process.

With 4D v18 R5, we’re bringing even more features to help you optimize and organize your code. For example, you might need to run a function locally on the client to improve performance when working in client/server mode. It’s now possible! Or if you expose your database as a REST server, you might want some functions to be available on the server-side but hidden for your REST clients. This is also possible!

News

4D v18 R4 is Here

Automatically translated from English

I’m very happy to announce that 4D v18 R4 is now available!

4D v18 R4 is one of the best feature releases ever delivered, with 20+ new features added to 4D’s ever-growing list.

From the 4D language that keeps getting better, to new capabilities 4D for iOS offers for building enriched apps, to the implementation of 4D Write Pro features you’ve requested. PLUS a whole new set of 4D View Pro commands to give you further control over your documents.

Without further ado, here’s a sneak peek of what’s in store for you:

Guest Post

How to create a simple “TimeStamp” class in 4D

Automatically translated from English

by guest author Tiran Behrouz, 4D developer (Vancouver, Canada) 

The introduction of ORDA in 4D v17 was a game-changer. Now with the introduction of classes in 4D v18 R3, we will witness a paradigm shift in 4D programming. We can now take advantage of object-oriented programming concepts such as polymorphism, composition, and inheritance to write our own class libraries. In this video, I demonstrate how to code a simple TimeStamp class using 4D and ORDA. 

Product

New declaration syntax for an intuitive autocompletion

Automatically translated from English

Have you ever wondered about 4D’s autocompletion feature or asked yourself why 4D suggests all functions used in the code? Since an object is a very generic type, 4D only knows what it’s really storing at runtime. However, that doesn’t help much when you’re writing your code.

4D now offers a new, alternative syntax which will greatly enhance autocompletion when declaring your variables.

Product

4D for iOS: Push Notifications

Automatically translated from English

4D v18 R4 delivers a very exciting feature … Push notifications. These are messages sent directly to the user’s mobile device from your app. Push notifications provide users with relevant information to encourage them to engage with an app. As of this feature release, 4D for iOS not only allows doing so but also allows you to do it with ease!

For email authentication, 4D for iOS also makes your life easier.

Product

4D for iOS: Email authentication

Automatically translated from English

Monitoring access to your mobile app is a very important capability that deserves further consideration. Email validation is one of the simplest and most secure ways to determine the authenticity and legitimacy of the person trying to log into your app. 4D for iOS enables you to easily handle this validation process by verifying that an email comes from whom it claims to be sent from, and by allowing you to block harmful uses of the email.

News

4D v18 R4 Beta Starts Today

Automatically translated from English

4D is pleased to announce the launch of beta testing for 4D v18 R4.

4D v18 R4 is one of the best Feature Releases ever delivered! I’m so thrilled to share all of the advances we’ve added to the ever-growing list of 4D features.

Without further ado, let’s get a sneak peek at the 20+ new functionalities waiting for you:

 

  • ORDA classes make their first appearance to enable business-oriented code so you can hide complexity, reduce errors, and speed up the development process.
  • A CryptoKey class is available to protect the confidentiality of your data, as well as verify the integrity of messages and the authenticity of senders. 
  • The 4D developer toolkit is bursting with additional features including a new declaration syntax for intuitive autocompletion, easy access by code to the values of form objects, and the ease of developing and debugging server code in project applications … just to name a few.
  • More exciting features are included with 4D for iOS for even more engaging apps, more UI possibilities, and more control over access to your app.
  • You asked for it, you got it! 4D Write Pro can import and export different document formats via the widget, as well as direct export to PDF while supporting hyperlinks, image size optimization, and more. 
  • You no longer need a 4D View Pro license to use pro list box features. They’re now FREE!
  • 4D View Pro also has a whole new set of commands to give you further control over your documents.
  • To make things even better (and simpler), 4D v18 R4 creates new projects by default, while developers – if they choose to do so – can continue to create binary databases via a simple setting.
  • And much more (see below).