defining and using globals in an application

Andre Garzia andre at andregarzia.com
Sat Jul 9 11:56:43 EDT 2011


Chipp and Francis,

Yes, I do like Chipp said but I go further and create multilevel arrays, all
with string keys like:

put "go back" into gMyGlobalA["menus"]["left side menu"]["label"]

=)

On Sat, Jul 9, 2011 at 12:27 PM, Chipp Walters <chipp at chipp.com> wrote:

> Hi Francis,
>
> I suspect what Andre does is create globals thusly:
>
> global gMyGlobalA
> put "red" into gMyGlobalA["color"]
> put "Francis" into gMyGlobalA["name"]
> etc..
>
> On Sat, Jul 9, 2011 at 5:05 AM, Francis Nugent Dixon <effendi at wanadoo.fr
> >wrote:
>
> > Hi from Beautiful Brittany,
> >
> > Andre Garzia wrote :
> >
> >
> >  I will have a global called
> >> gRecipeAppA and that will be an array, values will be inserted, queried
> >> for
> >> and deleted from this single shared array and collision will be avoided
> by
> >> naming it something almost unique.
> >>
> >
> > Hmmmm ! - Never thought of that !
> >
> > But doesn't that make your coding more obtuse, as you refer
> > to an element of the array by a number, and not by a name ?
> > (I never use arrays, as I can only think in one dimension,
> > which is why I have so many problems with "time". Arrays,
> > and other multi-dimensional concepts are way over my head !)
> >
> > Of course, I begin to grab arrays when I have another (Irish)
> > Whiskey !
> >
> >
> > -Francis
> >
> > "Nothing should ever be done for the first time !"
> >
> > ______________________________**_________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/**mailman/listinfo/use-livecode<
> http://lists.runrev.com/mailman/listinfo/use-livecode>
> >
>
>
>
> --
> Chipp Walters
> CEO, Shafer Walters Group, Inc.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
http://www.andregarzia.com All We Do Is Code.



More information about the use-livecode mailing list