Re: [WebDNA] Use of :global:

This WebDNA talk-list message is from

2013


It keeps the original formatting.
numero = 110317
interpreted = N
texte = --Apple-Mail=_25A072FB-7414-454B-AAD6-78AB06E777F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Thanks Donovan Not sure that I have a use for it at the moment. Looking at what you noted I tried this: -Scope begin...
[scope name=3DMyScope] [text]a=3D11[/text] [text]b=3D22[/text] [text]c=3D33[/text] List of local scope variables...
[listvariables scope=3DMyScope][name]=3D[value]
[/listvariables] -Scope end...
[/scope]

List of variables outside scope...
[listvariables scope=3DMyScope][name]=3D[value]
[/listvariables]

:named-MyScope:a=3D[:named-MyScope:a] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This is my result: -Scope begin... List of local scope variables... c=3D33 b=3D22 a=3D11 -Scope end... List of variables outside scope...=20 :named-MyScope:a=3D[a]=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =46rom your note about getting a value from outside the scope=20 "If outside the scope, you can get to that var value by using: = [:named-somescope:somevar]" I would have expected :named-MyScope:a to be 11 not [a] What am I missing ? Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 11/04/2013, at 3:23 PM, Donovan Brooke wrote: > Stuart Tremain wrote: >> I have been reading through this tip by Terry Wilson >>=20 >> http://webdna.us/page.dna?numero=3D147 >>=20 >> It talks about using [:global:date] >>=20 >> I couldn't work out how this was being set until I put it into a = template and to my surprise [:global:date] returned the date, I was = expecting to see raw tags. >>=20 >> What other goodies are hidden in with this :global: prefix, I can't = find any reference to it anywhere ? >>=20 >>=20 >> Regards >>=20 >> Stuart Tremain >=20 >=20 > Stuart, > Yes, documentation is.. well, a few years behind, isn't it. ;-) >=20 > A few of these contexts can be found by creating an IDE, then = reviewing the tutorials (use the HTML editor) >=20 > 'global' is a reserved scope name.. along with 'local' and 'insecure'. >=20 > You can set custom scope limits for vars as well: > [scope name=3Dsomescope][text]somevar=3Dvalue[/text][/scope] >=20 > If outside the scope, you can get to that var value by using: = [:named-somescope:somevar] >=20 > (same effect as when creating a function.. scope is implied.) >=20 > You can use "step wise" scoping... > lets say you are nested within 4 [listword..] contexts (it happens) = and you want the index value of the outer most [listwords..] context, = you can use [::::::index]. >=20 >=20 > Donovan >=20 >=20 >=20 >=20 >=20 >=20 >=20 > --=20 > Donovan Brooke > WebDNA Software Corporation > http://www.webdna.us > **[Square Bracket Utopia]** > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail=_25A072FB-7414-454B-AAD6-78AB06E777F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Thanks Donovan

Not sure that I have a use for it at = the moment.

Looking at what you noted I tried = this:

-Scope = begin...<BR>
[scope name=3DMyScope]
= [text]a=3D11[/text]
[text]b=3D22[/text]
= [text]c=3D33[/text]
List of local scope = variables...<BR>
[listvariables = scope=3DMyScope][name]=3D[value]<BR>
= [/listvariables]
-Scope = end...<BR>
[/scope]
<BR><BR>
List of variables outside = scope...
<BR>
[listvariables = scope=3DMyScope][name]=3D[value]<BR>
[/listvariables]
<BR><BR>
:named-MyScope:a=3D[:named-MyScope:a]=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

This is my result:
-Scope begin...
List = of local scope variables...
c=3D33
b=3D22
a=3D11
-Scope end...


List = of variables outside scope... 


:named-MyScope:a=3D[a] 

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


=46rom your note = about getting a value from outside the scope 
"If outside = the scope, you can get to that var value by using: = [:named-somescope:somevar]"

I would have = expected :named-MyScope:a to be 11 not [a]

What = am I missing ?



Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 11/04/2013, at 3:23 PM, Donovan Brooke <dbrooke@webdna.us> = wrote:

Stuart Tremain wrote:
I have = been reading through this tip by Terry Wilson

http://webdna.us/page.dna?= numero=3D147

It talks about using [:global:date]

I = couldn't work out how this was being set until I put it into a template = and to my surprise [:global:date] returned the date, I was expecting to = see raw tags.

What other goodies are hidden in with this :global: = prefix, I can't find any reference to it anywhere = ?


Regards

Stuart = Tremain


Stuart,
Yes, documentation is.. well, = a few years behind, isn't it. ;-)

A few of these contexts can be = found by creating an IDE, then reviewing the tutorials (use the HTML = editor)

'global' is a reserved scope name.. along with 'local' = and 'insecure'.

You can set custom scope limits for vars as = well:
[scope = name=3Dsomescope][text]somevar=3Dvalue[/text][/scope]

If outside = the scope, you can get to that var value by using: = [:named-somescope:somevar]

(same effect as when creating a = function.. scope is implied.)

You can use "step wise" = scoping...
lets say you are nested within 4 [listword..] contexts (it = happens) and you want the index value of the outer most [listwords..] = context, you can use = [::::::index].


Donovan







-- =
Donovan Brooke
WebDNA Software Corporation
http://www.webdna.us
**[Square = Bracket = Utopia]**
---------------------------------------------------------
= This message is sent to you because you are subscribed to
the mailing = list <talk@webdna.us>.
To unsubscribe, E-mail to: = <talk-leave@webdna.us>
archives: = http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: = support@webdna.us

= --Apple-Mail=_25A072FB-7414-454B-AAD6-78AB06E777F2-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Use of :global: (Donovan Brooke 2013)
  2. Re: [WebDNA] Use of :global: (Stuart Tremain 2013)
  3. Re: [WebDNA] Use of :global: (John Buler 2013)
  4. Re: [WebDNA] Use of :global: (Donovan Brooke 2013)
  5. [WebDNA] Use of :global: (Stuart Tremain 2013)
--Apple-Mail=_25A072FB-7414-454B-AAD6-78AB06E777F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Thanks Donovan Not sure that I have a use for it at the moment. Looking at what you noted I tried this: -Scope begin...
[scope name=3DMyScope] [text]a=3D11[/text] [text]b=3D22[/text] [text]c=3D33[/text] List of local scope variables...
[listvariables scope=3DMyScope][name]=3D[value]
[/listvariables] -Scope end...
[/scope]

List of variables outside scope...
[listvariables scope=3DMyScope][name]=3D[value]
[/listvariables]

:named-MyScope:a=3D[:named-MyScope:a] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This is my result: -Scope begin... List of local scope variables... c=3D33 b=3D22 a=3D11 -Scope end... List of variables outside scope...=20 :named-MyScope:a=3D[a]=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =46rom your note about getting a value from outside the scope=20 "If outside the scope, you can get to that var value by using: = [:named-somescope:somevar]" I would have expected :named-MyScope:a to be 11 not [a] What am I missing ? Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 11/04/2013, at 3:23 PM, Donovan Brooke wrote: > Stuart Tremain wrote: >> I have been reading through this tip by Terry Wilson >>=20 >> http://webdna.us/page.dna?numero=3D147 >>=20 >> It talks about using [:global:date] >>=20 >> I couldn't work out how this was being set until I put it into a = template and to my surprise [:global:date] returned the date, I was = expecting to see raw tags. >>=20 >> What other goodies are hidden in with this :global: prefix, I can't = find any reference to it anywhere ? >>=20 >>=20 >> Regards >>=20 >> Stuart Tremain >=20 >=20 > Stuart, > Yes, documentation is.. well, a few years behind, isn't it. ;-) >=20 > A few of these contexts can be found by creating an IDE, then = reviewing the tutorials (use the HTML editor) >=20 > 'global' is a reserved scope name.. along with 'local' and 'insecure'. >=20 > You can set custom scope limits for vars as well: > [scope name=3Dsomescope][text]somevar=3Dvalue[/text][/scope] >=20 > If outside the scope, you can get to that var value by using: = [:named-somescope:somevar] >=20 > (same effect as when creating a function.. scope is implied.) >=20 > You can use "step wise" scoping... > lets say you are nested within 4 [listword..] contexts (it happens) = and you want the index value of the outer most [listwords..] context, = you can use [::::::index]. >=20 >=20 > Donovan >=20 >=20 >=20 >=20 >=20 >=20 >=20 > --=20 > Donovan Brooke > WebDNA Software Corporation > http://www.webdna.us > **[Square Bracket Utopia]** > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail=_25A072FB-7414-454B-AAD6-78AB06E777F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Thanks Donovan

Not sure that I have a use for it at = the moment.

Looking at what you noted I tried = this:

-Scope = begin...<BR>
[scope name=3DMyScope]
= [text]a=3D11[/text]
[text]b=3D22[/text]
= [text]c=3D33[/text]
List of local scope = variables...<BR>
[listvariables = scope=3DMyScope][name]=3D[value]<BR>
= [/listvariables]
-Scope = end...<BR>
[/scope]
<BR><BR>
List of variables outside = scope...
<BR>
[listvariables = scope=3DMyScope][name]=3D[value]<BR>
[/listvariables]
<BR><BR>
:named-MyScope:a=3D[:named-MyScope:a]=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

This is my result:
-Scope begin...
List = of local scope variables...
c=3D33
b=3D22
a=3D11
-Scope end...


List = of variables outside scope... 


:named-MyScope:a=3D[a] 

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


=46rom your note = about getting a value from outside the scope 
"If outside = the scope, you can get to that var value by using: = [:named-somescope:somevar]"

I would have = expected :named-MyScope:a to be 11 not [a]

What = am I missing ?



Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 11/04/2013, at 3:23 PM, Donovan Brooke <dbrooke@webdna.us> = wrote:

Stuart Tremain wrote:
I have = been reading through this tip by Terry Wilson

http://webdna.us/page.dna?= numero=3D147

It talks about using [:global:date]

I = couldn't work out how this was being set until I put it into a template = and to my surprise [:global:date] returned the date, I was expecting to = see raw tags.

What other goodies are hidden in with this :global: = prefix, I can't find any reference to it anywhere = ?


Regards

Stuart = Tremain


Stuart,
Yes, documentation is.. well, = a few years behind, isn't it. ;-)

A few of these contexts can be = found by creating an IDE, then reviewing the tutorials (use the HTML = editor)

'global' is a reserved scope name.. along with 'local' = and 'insecure'.

You can set custom scope limits for vars as = well:
[scope = name=3Dsomescope][text]somevar=3Dvalue[/text][/scope]

If outside = the scope, you can get to that var value by using: = [:named-somescope:somevar]

(same effect as when creating a = function.. scope is implied.)

You can use "step wise" = scoping...
lets say you are nested within 4 [listword..] contexts (it = happens) and you want the index value of the outer most [listwords..] = context, you can use = [::::::index].


Donovan







-- =
Donovan Brooke
WebDNA Software Corporation
http://www.webdna.us
**[Square = Bracket = Utopia]**
---------------------------------------------------------
= This message is sent to you because you are subscribed to
the mailing = list <talk@webdna.us>.
To unsubscribe, E-mail to: = <talk-leave@webdna.us>
archives: = http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: = support@webdna.us

= --Apple-Mail=_25A072FB-7414-454B-AAD6-78AB06E777F2-- Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCatalog Work (2001) Upgrade to 3.07 problems (2000) Separate SSL Server (1997) Search returns all, not 20 (1997) Execute Applescript (1997) Emailer help....! (1997) can WC render sites out? (1997) WebCat2 - [format thousands] (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) PCS Emailer's role ? (1997) IE-caching (1998) Multiple Ad databases? (1997) URGENT: WebCatalog 2.0 (1998) Test (2003) I'm new be kind (1997) Newbie Help Needed (1998) Multiple catalog databases and showcart (1997) Help! WebCat2 bug (1997) Country & Ship-to address & other fields ? (1997) [OT] MacOs IE5 topmargin and leftmargin bug (2000)