Summary

While we had the productivity plugins we also had a helpful API. Take 4D Write as example. When I want to get or set the document-info, there was one command WR GET/SET DOCUMENT INFO ( area ; title ; subject ; author ; company ; notes ; creationDate ; creationTime ; modifDate ; modifTime ; lock ) to access those attributes. Easy to read, easy to update.
This is completely gone with 4D Write Pro. One command to access any attribute. No themes or groups to help, besides some kind of already broken nomenClature.


Starting with 4D Write Pro I have to write this code (right, no WP-command involved)
ARRAY LONGINT($t_DataTypes_L;0)
OB GET PROPERTY NAMES([BRIEFE]BRIEF_WritePro_O;t_briefAttKeys;$t_DataTypes_L)
$N:=Size of array(t_briefAttKeys)
ARRAY TEXT(t_briefAttValues;$N)
For ($i;1;$N)
t_briefAttValues{$i}:=OB Get([BRIEFE]BRIEF_WritePro_O;t_briefAttKeys{$i};Is text)
End for

4D Write Pro Attributes

4D Write Pro attributes, a messy list

to get a list of the attributes, that are in use by that document. Those arrays from the codelines above are the key (left) and value (right) column of the listbox shown aside.

Tell me how to find attributes belonging to the document-info theme? Hidden inside too much information, I suppose. One might dig them out somehow. Digging means constantly switching the manual-pages between command syntax and that appendix, that lists 4D Write Pro attributes.

This is a major hinderance while developing. We’ll start creating our wrapper-methods, to keep things together, which belong together. How will those wrapper-methods look like? Exactly, like a mess and they will break with every new 4D Write Pro version, I suppose.

Instead of a somehow out-fashioned command
WR GET/SET DOCUMENT INFO ( area ; attributeKeysArray; attributeValueysArray)
I’d expect something like
WP GET/SET ATTRIBUTE(rangeObj | wpDoc ; attribTheme ; attribNameArray ; attribValueArray)
from an up-to-date development.
Subsuming attributes into themes or groups will help me the 4D-developer a lot. The themes as of today are: background, borders, document, fonts and text, height/width, image, lists, margins, padding, paragraphs, style sheets. I’d access them individually or when used „all“ as attributeTheme I’d get them all in once. By the way, I got that theme-list from the manual 4D Write Pro Attributes *.

As much as I like the object-datatype as of V14, it did open a box of Pandora’s concerning key-names. 4D Write Pro as of today proves that.

Once 4D drew knowledgable people into developing, making complex tasks easy to be used. Today it’s more like any programming environment, counting the features and leaving the development-comfort for a second shot as earliest. I’d prefer 4D to still be outstanding, drewing knowledgable people into developing.

* if I’d build the manuals, I’d use a <!–#include virtual=“attributes.shtml“ –> to also include the attributes with the description of the command-syntax. Would spare me a lot of to and froing.