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]
**********************************************************************

Reply via email to