Host db 4D Object references and components

I’ve been working with some component programming and following the documentation, which still states that variables (local, process, and interprocess) are unshared between the host and component. I’ve found that I can share an Object Reference directly with a component (interpreted and compiled) from an interpreted host db. My tests have only been with v17 R3, so I do not know if this was always the case with 4D language objects. Will the documentation eventually change to reflect that objects can be shared with components? or am I tempted to use an undocumented feature that may disappear in a later version?


Hi Ed,

Variables are not shared, that’s true, except for references such as hierarchical list, dom, menu which are all references. So, you can share a reference with a component or a host database. This is also true with objects.

And pointers also ?

If it is a pointer to a process variable (or interprocess). Yes

As an exemple, in the 4D SVG component the command> allow to populate a variable of the host database when you call a “SVG_SAVE_AS_PICTURE/TEXT” command. Normally, you pass a pointer to the system variable>.