Thank you for your input. Naturally, if the object name gets to be exactly the same as the ‘expression’ that works (IFF the value is stored in Form.[whatever] ) But when the ‘expression’ is an attribute in an entity, as I described, there is no way you can name the object like that. I have employed the ’object name = Form. [ object name]’ methodology too. But that works in instances where it is a legal object name.
I do not understand the complexity of 4D’s internal implementation, but in the same way that you can get a pointer to a process variable, it seems you should be able to for Form.obj too (i.e. when the ‘expression’ is an attribute of some object). — Chris > On Feb 4, 2020, at 7:14 AM, James Crate via 4D_Tech <[email protected]> > wrote: > > This was annoying the first time I ran into it, but overall hasn’t really > caused any serious problems for generic programming. If you name the object > with the expression, you can use something like: > > Form[Object Get name(Object current)]:=x > > If you need to set properties on a form object (control) like > color/disabled/etc, you can use the object name as well. The only problem is > you may not be able to effectively use an object name prefix to set > properties on a group of controls. > > I agree it would be nice if references to form controls and access to their > values had been thought through a little better, but I doubt it’s likely to > change now. > > Jim Crate > > >> On Feb 3, 2020, at 10:35 PM, Chris Belanger via 4D_Tech >> <[email protected]> wrote: >> >> What a weird ’subject’ for this question. Sorry. Seems quite confusing. >> >> ———— >> >> Say that the “variable or expression” for a on-screen object is >> Form.LB.Browser.en_edit.FirstName >> This is entirely reasonable, as 4D’s ORDA has taught us to use such >> ‘expressions’ for the fields >> >> BUT in the script for this, there is no way to use Self (as there would be >> if it was a 4D variable) because it is an ATTRIBUTE of an object. >> >> This is stupid. >> It makes it impossible to write a script as simple as: >> >> Self->:= Uppercase(Self->) >> >> Because Self returns a nil pointer. >> >> So how on earth do we retrieve and set the value under these circumstances? >> [GENERICALLY; I do not want to use the object’s “expression” in the script] >> >> There is no such 4D method as OBJECT Get Value( ) OBJECT SET VALUE( ) >> If there were, we could write: >> >> OBJECT SET VALUE(*; OBJECT Get Name; Uppercase( OBJECT Get Value(Object Get >> Name) ) ) // really cumbersome, but is hypothetical because there is no >> ‘OBJECT GET / SET VALUE’ command. >> >> >> ********************************************************************** >> 4D Internet Users Group (4D iNUG) >> Archive: http://lists.4d.com/archives.html >> Options: https://lists.4d.com/mailman/options/4d_tech >> Unsub: mailto:[email protected] >> ********************************************************************** > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:[email protected] > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

