TechBlog - Messages with tag "1C:Enterprise script"


If you wish to leave comments or ask questions, please log on or sign up.

Support of plural forms for cardinal and ordinal numerals

This feature is implemented in 1C:Enterprise version 8.3.10.2168.

We have added support for strings that require harmonization with numerals to the platform. Now you can generate strings of the “run time 1 second” and “run time 32 seconds” type automatically, without analyzing the numeral in order to use the correct unit of measurement form.

To this end, we added a new StringWithNumber() method to the platform. Its working principle is based on the fact that any numeral in any language can be classified into one of the six categories:

  • ZERO
  • ONE
  • TWO
  • FEW
  • MANY
  • OTHER

In different languages, the same numerals may refer to different categories. Besides, not all languages have all six categories. For example, in the German language, categories ZERO, TWO, FEW, and MANY are not used. The detailed table of conformity of categories with numerals for all languages can be viewed on unicode.org.

Read more...

Photo:

Development of diagnostic tools

This feature is implemented in 1C:Enterprise version 8.3.10.2168.

We have implemented several changes that will enable you to diagnose and eliminate potential memory leaks more quickly, and will make it easier to investigate problems associated with acquiring and releasing of licenses.

Search of circular references

The 1C:Enterprise 8 platform uses the object lifetime management strategy that is based on object reference counting. This strategy can be described as follows. Each object of the platform contains a reference count. When a reference to an object appears (when an object is assigned to a variable), the count increases by one, when such reference is removed - the count value decreases by one. When the object reference count equals zero, the object is automatically destroyed, and the memory occupied by it is freed up.

One of the peculiarities of object reference counting is the possibility of implementing a circular reference. A circular reference occurs when objects start to refer to each other. For example, if there are objects nested inside other objects, and somewhere deep inside, they refer to the topmost object. The result is a circular reference. In the simplified form, a circular reference can be created as follows:

Read more...

Photo:

Extending functionality for working with binary data

This feature is implemented in 1C:Enterprise version 8.3.10.2168.

We are gradually increasing the functionality for working with binary data. There are several reasons for this. At the first stage, we have not implemented everything we had originally planned. Secondly, while discussing new possible features, we have received a number of requests from you that we have also decided to implement.

New functions for converting binary data into different formats

We have added many new functions that convert binary data to the global context. For example, you can implement direct and inverse conversion of binary data into a regular string, string of Base64 format and string of BinHex format. In addition, you can convert binary data into formats Base64, BinHex, and vice versa.

Similar conversions are supported for the BinaryDataBuffer type. You can convert binary data buffer into binary data and back.

Read more...

Module extensions

This feature is implemented in 1C:Enterprise version 8.3.9.1818.

In short, you can now use extensions to modify the modules of standard configurations and add new modules.

Or rather, now you can change any modules, with the exception of ordinary form modules:

  • Common modules
  • Object modules (object module, manager module, etc.) for all types of objects
  • Session module
  • Managed application module
  • External connection module
  • Command modules
  • Form modules
  • etc.

Please note that you were already able to modify managed form modules in the past, but now we have introduced some changes to this process.

For the simplicity sake, we will refer to the phrase “procedure/function” as “method”. Thus, all changes that you can implement in the modules can be divided into 4 groups:

Read more...

Photo:

Development of tools for working with binary data

This feature is implemented in 1C:Enterprise version 8.3.9.1818.

We have implemented a number of low-level tools for working with binary data. Now you can handle such tasks as:

  • Interaction with specialized devices using a binary protocol
  • File parsing and operations with files in different formats
  • Converting text data to binary data directly, for example, to send reports
  • Working with binary data in the memory

Previously, the platform had a number of methods available for working with files and the BinaryData type. But they did not provide any easy way to analyze the internal contents or modify it. All actions were performed for all data at the same time. The only operation that could be done with a portion of the data is splitting a file into parts and putting it back together.

Now the platform provides tools both for sequential operations with large amounts of binary data and random access to relatively small amounts of binary data entirely in RAM.

Read more...

Photo: