=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
=div>
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:
--Apple-Mail=_25A072FB-7414-454B-AAD6-78AB06E777F2Content-Transfer-Encoding: quoted-printableContent-Type: text/plain;charset=iso-8859-1Thanks DonovanNot 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=3DThis is my result:-Scope begin...List of local scope variables...c=3D33b=3D22a=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 ?RegardsStuart TremainIDFK Web DevelopmentsAUSTRALIAwebdna@idfk.com.auOn 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-78AB06E777F2Content-Transfer-Encoding: quoted-printableContent-Type: text/html;charset=iso-8859-1Thanks 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]
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
=div>
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:
Help! WebCat2 bug (1997)
OT:looking for developers with solutions (2000)
Username for Admin Group (1997)
Frames and WebCat (1997)
Date format problems (1997)
Weird cart problem (webcat 2.x) (2000)
Here's how to kill a Butler Database. (1997)
Restricting to one folder hierarchy on the entire server ... (2005)
Date search bug (1998)
Some Advise needed (1997)
products db philosophy (2001)
Some Questions (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
Developers in Washington State (2004)
WebCat2: Items xx to xx shown, etc. (1997)
PCS Frames (1997)
WebCat editing, SiteGuard & SiteEdit (1997)
Shell on MacOSX (2004)
Subtotal and Grand Total Changes (2000)
More on the email templates (1997)