Miyako,

I didn’t give the full background. I have a component which makes methods and 
forms (to be used as subforms) available to its host. I want to keep the 
interface between the component and the host as simply as possible.  Some 
methods need to be run in the context of the subform. It’s nice for the host 
not to care whether a component method it calls need to be run in the subform.

So the component checks to see if a called method is being run in subform 
context and if it’s not, puts it into the subform context by calling EXECUTE 
METHOD IN SUBFORM. To do that, it has to know the name of the subform object.

Of course the host could pass the name of the object; in this particular 
situation, it would be nice if it didn’t have to do that, if the component code 
could get the name of the subform by itself. If it can’t, it can’t, but it does 
seem a little odd. OBJECT get name(object current) doesn’t work.

Jeremy

> On 27 Sep 2019, at 01:33, Keisuke Miyako via 4D_Tech <[email protected]> 
> wrote:
> 
> just like any regular form object (button, etc),
> the object name should have no inferred effect on the subform.
> 
> the bounding variable (data source) should be the only thing
> that inherently controls its behaviour.
> 
> anything else should be considered an option
> and explicitly given to the subform from parent via an API
> 
> EXECUTE METHOD IN SUBFORM, or OBJECT Get pointer(*;...;subform) etc.
> 
> 2019/09/27 7:28、Jeremy Roussak via 4D_Tech 
> <[email protected]<mailto:[email protected]>>のメール:
> 
> I can get a pointer to the subform’s variable using OBJECT Get pointer(Object 
> subform container). How do I get the name of the object (on the parent form) 
> which holds the subform?
**********************************************************************
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