> On 11 Oct 2018, at 08:49, Bernd Fröhlich via 4D_Tech <[email protected]> 
> wrote:
> 
> there are no globals required for menus (I assume here that you are talking 
> about popup menus in the form).
> Just give them an objectname, get a pointer in the "on load" phase with 
> Object Get Pointer and define the array using that pointer.

Hi Bernd

Thanks for that tip. I will experiment with your approach.

Out of interest, what advantages does this give you over using a global ? The 
advantage of a global to me is that it preserves state throughout the life of 
the form without any coding. (For example you don’t need to keep using Object 
get Pointer(“myPopUp”) all over the place to re-create the state). Also, using 
globals lets you do a lot of type-based debugging at compile time.

If we take this to its logical conclusion won’t we just end up with Delphi, 
.NET or Python instead of 4D ? (i.e. a low level environment that’s extremely 
versatile but far less productive).

Regards

Peter

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