Component Object4D

This component emulates 4D standard commands for objects such as OB Set or OB Get to add access to properties or sub-objects by path with dot notation.
It has been clearly inspired by OBJ_Module of Cannon Smith but differs by :

  • it emulates standard commands and does not have commands by type
  • it resolves paths with arrays elements
  • it gives some advanced controls such as search in an array by the value of a property.
    It does not intend to replace all functions of OBJ_Module.
    You can download it http://forums.4d.fr/4DBB_Main/x_User/4018/files/18899864.ziphere>.
    Method OBJ_Test gives several operational examples ; some functions are not yet implemented.
    Comments appreciated.

[Update] Link modified to be sure it is source code ; Christmas gift !

Code sharing zone is french/english ; how can I change the flag for this post to US ?

OB_get($usa_o;“greenCard”) :mrgreen:

Si tu as testé, tu écriras désormais :
OBJ_Get($usa_o;

OS : Mac OS X

Hello,

for witch 4D Version?

can´t open with 4D v14.5!

Thank you

At least OBJ_get/set cannot end with anything else than the verb :wink:

BTW: my previous post was send using the english UI, no way. Next attempt will be to send after having changed my profile as being an inuit.

I build it with 4D V15R4 without paying attention to this detail !
I think that nothing is incompatible with V14 and tried to control but I have no license for V14.
I really don’t understand why my licence V15 doesn’t authorize to run V14…
I’ll try to solve that.

Hi Axel,
Bernard works in v15 I believe. But I made a port of http://forums.4d.fr/Post/EN/18850194/1/18850195#18850195Cannon’s OB_module> from v15 to v14 recently (I needed dot notation) in which you’ll find 2 methods (importAll, exportAll) that I used. I don’t think it takes more than a quater to downgrade this way.

I don’t know how to solve that ; I can give you methods.c4d…

Here is V14 http://forums.4d.fr/4DBB_Main/x_User/4018/files/18899850.zip ; thanks to Arnaud for back-pedalling !
I named it Object4DV14 to avoid confusions on my HD and suggest you to rename Object4D.
It is source code.
I update first message to be sure I put source code for V15 version.

Merci, Thank you und Dankeschön!

Try and comment !

Note…
a/ from Jean Pierre Ribraud (alias JPR) on the nug:
“[Dot Notation] will come, and not in a far future. And it’s very powerful.”
b/ some http://doc.4d.com/4Dv16R2/4D/16-R2.1620/Liste-des-nouveautes.901-3111161.fe.htmlnew commands> already use it, for example:
ORDER BY ATTRIBUTE ( {aTable ;} objectField ; attributePath
QUERY BY ATTRIBUTE ( {aTable}{;}{conjOp ;} objectField ; attributePath