Bernard, This works perfectly fine until you use an object member as your data source. Once you do that, the Object get pointer command will return a nil pointer.
In your example, put Form.Note as your data source (Variable or Expression), run it and see what you get.... Regards, Lahav -----Original Message----- From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Bernard Escaich via 4D_Tech Sent: Wednesday, May 6, 2020 2:16 AM To: 4D iNug Technical <4d_tech@lists.4d.com> Cc: Bernard Escaich <bernard.esca...@gmail.com> Subject: Re: Object notation replacement for use of Self in a script — v18 Why not use Form event.objectName ? I find it very useful ; I use it and write in form method : Case of :(Form event.code=On data change) Case of :(Form event.objectName="Name) Object get pointer(Object named;"Name")->:=MyMethodUppercase( Object get pointer(Object named;"Name")->) :(Form event.objectName="Address) Object get pointer(Object named;"Address")->:=MyMethodUppercase( Object get pointer(Object named;"Address")->) :(Form event.objectName="Form.Note) Object get pointer(Object named;"Form.Note")->:=MyMethodUppercase( Object get pointer(Object named;"Form.Note")->) End case End case Two solutions for MyMethod : - if used elsewhere, use a method (waiting for classes) - if used locally, made a call to form method : Execute method(Current method name;…. Cordialement, Bernard Escaich > Le 29 avr. 2020 à 19:15, lists via 4D_Tech <4d_tech@lists.4d.com> a écrit : > > OK, so can we get a real example of how to replace the *old* way with the > new? In a case where there are several entry objects: > > Form.Name > Form.Address > Form.Note > > I want to enforce a proper uppercase/lowercase on all three, so in the old > days I created an object, set the method to "UpperLower(self)", duplicated it > three times, change the object name and I'm done. For simplicity sake, lets > say that UpperLower simply do $1->:=Uppercase($1->). > > How would you do the same while using object notation instead of a variable, > dynamic or not? ********************************************************************** 4D Internet Users Group (4D iNUG) New Forum: https://discuss.4D.com Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) New Forum: https://discuss.4D.com Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************