Ah yes, sorry I skimmed too fast.
Add
From: Peter Bozek
Date: Wednesday, February 5, 2020 at 11:10 AM
To: iNug <4d_tech@lists.4d.com>
Cc: Add Komoncharoensiri
Subject: Re: What is equivalent to SELF when a form object's "variable or
expression" is an object attribute?
On Wed, Feb 5, 2020
On Wed, Feb 5, 2020 at 7:04 PM Add Komoncharoensiri via 4D_Tech <
4d_tech@lists.4d.com> wrote:
> Just a little modification from Peter's code
>
> Instead of defining an object attribute in the Variable and Expression,
> leave it blank so 4D will generate a dynamic variable for it. In the object
>
Just a little modification from Peter's code
Instead of defining an object attribute in the Variable and Expression, leave
it blank so 4D will generate a dynamic variable for it. In the object method,
you just need to execute the following when the On Data Change occurs.
Case of
: (FORM
On Tue, Feb 4, 2020 at 9:58 PM Chris Belanger via 4D_Tech <
4d_tech@lists.4d.com> wrote:
>
> So I had to resort to creating a FORMULA OBJECT that gets executed to do
> the update of the .storeLoc
>
> $formula:=Formula from string($storeLoc+":="+Qu ($UUID)) // $storeLoc is
> the full ‘path’ of
It’s not so much that the pointer is not needed, but that it isn’t available so
we have to figure out other ways to work around that fact when pointers would
be more useful and allow you to write less brittle code.
Having to specify almost the same text for the name as for the expression, or
Hello,
Object get pointer(Object current)->
is synonymous to Self,
and likewise it will point to nothing if the current object is not bound to a
variable.
I think this is a strong sign that in object based design,
pointers are very rarely needed, if at all,
and that this kind of generic code
Chris,
Is it not just:
Object get pointer(Object current)->:=Uppercase(Object get
pointer(Object current)->)
Regards, Dougie
telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759 Mobile : 07973 675 218
2nd Floor Broadway House, 4-6
if I may interject, the O.P. was asking for generic coding,
where the object method does not know its data source expression.
but in my opinion (yes it is an opinion, not doctrine)
it is better to plan well and hard-code in ORDA,
generic coding does not deliver like it does for the classic
Chris,
On Tue, Feb 4, 2020 at 12:58 PM Chris Belanger via 4D_Tech <
4d_tech@lists.4d.com> wrote:
> // The ‘field’ that needed to be updated with the KEY of the selected
> option would be something like: //
> Form.en_edit.contact // which, say, translates to [Company]contact in
> classic 4D
>
>
Hi Kirk,
I appreciate how generous you are with answering questions on this forum.
I understand the 1) 2) 3) points you make. I love the fact we can ‘attach’
things to Form. Instead of using process vars. I do not use a single process
var in my most recent projects.
I had to do a weird
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
I believe this is related to other topic that was discussed here, namely
that you cannot get pointer to object properties. So there is no way how to
get a pointer pointing to Form.LB.Browser.en_edit.FirstName.
As you noticed, you can still manipulate such form objects with commands
that accept
Chris,
For a listbox the equivalent of 'self' is the Current Item Datasource.
Let's say that is Form.LB.currentItem in keeping with your example. (It
could be something else just as well.) This is the object that corresponds
to the listbox row generally speaking. So you could have a method that
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
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
15 matches
Mail list logo