Re: [WebDNA] passing a variable in an include - precedence
This WebDNA talk-list message is from 2017
It keeps the original formatting.
numero = 113417
interpreted = N
texte = 1010Hello,My .02=A2 on this. =20I believe WSC was addressing the issue I brought up about encapsulation =in WebDNA on this change.=20Encapsulation is a very important part of contemporary programming and =works hand-in-hand with variable scoping (Which I think is what Tom is =dealing with now).=20Unfortunately, this was one of the last things SMSI was working on =before WSC purchased WebDNA=85 and this stuff was never fully worked out =nor documented well.=20My opinion is that people like Tom (who uses this stuff in a real world =situation) should work directly with WSC and the WSC programmer =specifically whom **understands** OOP programming (specifically =encapsulation and variable scoping) to refine WebDNA in this area.The end result of this partnership should be:1.) Clear use of Variable Scoping (in Include, Function, and Text / Math =variables=85 as well as the ancillary tags/contexts, such as =[ListVariables..])2.) Refinement of the Include tag=92s feature of =93&varname=3Dvalue=94...= addressing encapsulation.=203.) Clear documentation of all of this.=20There is a real opportunity here (in my opinion) to bring WebDNA to a =new level of sophistication / maturity. I do think WebDNA is not that =far off from getting there=85 it just needs some tweaks and some better =documentation and understanding.=20Sincerely,DonovanOn Feb 21, 2017, at 9:07 AM, Tom Duke
wrote:> Chris,>=20> Hi - that behaviour that you describe is consistent and makes sense.>=20> But my problem is when I use insecure text variables to set default =values in an include file. I would not expect an insecure text variable =to overwrite an incoming include variable.>=20> Taking your example but setting the text variable in the include file =to insecure>=20>=20> =97=97=97=97=97=97-test1.dna=97=97=97=97=97=97-> [include file=3Dtest2.inc&var1=3D8&var2=3D9&var3=3D23]>
> main file : [var1] with [var2] with [var3]> =97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97=97=97=97-=97=97> =97=97=97=97=97=97-test2.inc=97=97=97=97=97=97-> [text secure=3DF]var3=3D0634[/text]>=20> included file : [var1] with [var2] with [var3]> =97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97>=20>=20> I would think that in this case var3 should not be overwritten. =Perhaps I am misunderstanding the relationship between text and include =variables.>=20> It means that instead of using>=20> [text secure=3DF]var3=3D23[/text]>=20> to set default values in include files I will have to use>=20> [showif =[url][var3[/url]=3D[url][raw][var3][/raw][/url]][text]var3=3D23[/text][/sh=owif]>=20> - Tom>=20>=20>=20>=20>=20>=20>=20>=20>=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=3D> Digital Revolutionaries> 1st Floor, Castleriver House> 14-15 Parliament Street> Temple Bar,Dublin 2> Ireland> ----------------------------------------------> [t]: + 353 1 4403907> [e]: > [w]: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>=20> On 21 February 2017 at 08:35, wrote:> Hello Tom, there is a behavioral change: here the results of loading =test1.dna on 8.5.1 and 6.2>=20> =97=97=97=97=97=97-test1.dna=97=97=97=97=97=97-> [include file=3Dtest2.inc&var1=3D8&var2=3D9&var3=3D23]>
> main file : [var1] with [var2] with [var3]> =97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97=97=97=97-=97=97> =97=97=97=97=97=97-test2.inc=97=97=97=97=97=97-> [text]var3=3D0634[/text]>=20> included file : [var1] with [var2] with [var3]> =97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97>=20>=20>=20> on 8.5.1 we get> included file : 8 with 9 with 0634> main file : [var1] with [var2] with 0634>=20> on 6.2 we get> included file : 8 with 9 with 23> main file : [var1] with [var2] with 0634>=20>=20> However, in test1.dna, we load a file and simultaneously pass three =variable values, and the included file overwrites one of the variables =with another value. It seems consistant to me that the result shows the =overwriting variable, and not the overwritten one.>=20> So, to me, 8.5.1 is consistant.>=20> Any opinion about this?>=20> - chris>=20>=20>=20> > On Feb 20, 2017, at 17:37, Tom Duke wrote:> >> > Hi all,> >> > Ok I have just hit an issue with variables using WebDNA 8.5.1 on =CentOS 7.> >> > Prior to the upgrade calling this include:> >> > [include =file=3D/common/includes/smUtility-navlist-bootstrap.inc&smNAVCLASS=3Dprima=ry-nav]> >> > and having this in the include file:> >> > [text secure=3DF]smNAVCLASS=3D[/text]> >> > would result in the variable 'smNAVCLASS' being set to ='primary-nav'.> >> > After the upgrade the variable 'smNAVCLASS' being set to '' - i.e. =blank.> >> > So the line "[text secure=3DF]smNAVCLASS=3D[/text]" is overwriting =the passed in include variable.> >> > Is this the intended behaviour? If so then I have a lot of code to =rewrite.> >> > - Tom>=20>=20>=20> ---------------------------------------------------------> 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>=20> --------------------------------------------------------- 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---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
Associated Messages, from the most recent to the oldest:
1010Hello,My .02=A2 on this. =20I believe WSC was addressing the issue I brought up about encapsulation =in WebDNA on this change.=20Encapsulation is a very important part of contemporary programming and =works hand-in-hand with variable scoping (Which I think is what Tom is =dealing with now).=20Unfortunately, this was one of the last things SMSI was working on =before WSC purchased WebDNA=85 and this stuff was never fully worked out =nor documented well.=20My opinion is that people like Tom (who uses this stuff in a real world =situation) should work directly with WSC and the WSC programmer =specifically whom **understands** OOP programming (specifically =encapsulation and variable scoping) to refine WebDNA in this area.The end result of this partnership should be:1.) Clear use of Variable Scoping (in Include, Function, and Text / Math =variables=85 as well as the ancillary tags/contexts, such as =[ListVariables..])2.) Refinement of the Include tag=92s feature of =93&varname=3Dvalue=94...= addressing encapsulation.=203.) Clear documentation of all of this.=20There is a real opportunity here (in my opinion) to bring WebDNA to a =new level of sophistication / maturity. I do think WebDNA is not that =far off from getting there=85 it just needs some tweaks and some better =documentation and understanding.=20Sincerely,DonovanOn Feb 21, 2017, at 9:07 AM, Tom Duke wrote:> Chris,>=20> Hi - that behaviour that you describe is consistent and makes sense.>=20> But my problem is when I use insecure text variables to set default =values in an include file. I would not expect an insecure text variable =to overwrite an incoming include variable.>=20> Taking your example but setting the text variable in the include file =to insecure>=20>=20> =97=97=97=97=97=97-test1.dna=97=97=97=97=97=97-> [include file=3Dtest2.inc&var1=3D8&var2=3D9&var3=3D23]>
> main file : [var1] with [var2] with [var3]> =97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97=97=97=97-=97=97> =97=97=97=97=97=97-test2.inc=97=97=97=97=97=97-> [text secure=3DF]var3=3D0634[/text]>=20> included file : [var1] with [var2] with [var3]> =97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97>=20>=20> I would think that in this case var3 should not be overwritten. =Perhaps I am misunderstanding the relationship between text and include =variables.>=20> It means that instead of using>=20> [text secure=3DF]var3=3D23[/text]>=20> to set default values in include files I will have to use>=20> [showif =[url][var3[/url]=3D[url][raw][var3][/raw][/url]][text]var3=3D23[/text][/sh=owif]>=20> - Tom>=20>=20>=20>=20>=20>=20>=20>=20>=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=3D> Digital Revolutionaries> 1st Floor, Castleriver House> 14-15 Parliament Street> Temple Bar,Dublin 2> Ireland> ----------------------------------------------> [t]: + 353 1 4403907> [e]: > [w]: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>=20> On 21 February 2017 at 08:35, wrote:> Hello Tom, there is a behavioral change: here the results of loading =test1.dna on 8.5.1 and 6.2>=20> =97=97=97=97=97=97-test1.dna=97=97=97=97=97=97-> [include file=3Dtest2.inc&var1=3D8&var2=3D9&var3=3D23]>
> main file : [var1] with [var2] with [var3]> =97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97=97=97=97-=97=97> =97=97=97=97=97=97-test2.inc=97=97=97=97=97=97-> [text]var3=3D0634[/text]>=20> included file : [var1] with [var2] with [var3]> =97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97=97=97=97-=97=97=97>=20>=20>=20> on 8.5.1 we get> included file : 8 with 9 with 0634> main file : [var1] with [var2] with 0634>=20> on 6.2 we get> included file : 8 with 9 with 23> main file : [var1] with [var2] with 0634>=20>=20> However, in test1.dna, we load a file and simultaneously pass three =variable values, and the included file overwrites one of the variables =with another value. It seems consistant to me that the result shows the =overwriting variable, and not the overwritten one.>=20> So, to me, 8.5.1 is consistant.>=20> Any opinion about this?>=20> - chris>=20>=20>=20> > On Feb 20, 2017, at 17:37, Tom Duke wrote:> >> > Hi all,> >> > Ok I have just hit an issue with variables using WebDNA 8.5.1 on =CentOS 7.> >> > Prior to the upgrade calling this include:> >> > [include =file=3D/common/includes/smUtility-navlist-bootstrap.inc&smNAVCLASS=3Dprima=ry-nav]> >> > and having this in the include file:> >> > [text secure=3DF]smNAVCLASS=3D[/text]> >> > would result in the variable 'smNAVCLASS' being set to ='primary-nav'.> >> > After the upgrade the variable 'smNAVCLASS' being set to '' - i.e. =blank.> >> > So the line "[text secure=3DF]smNAVCLASS=3D[/text]" is overwriting =the passed in include variable.> >> > Is this the intended behaviour? If so then I have a lot of code to =rewrite.> >> > - Tom>=20>=20>=20> ---------------------------------------------------------> 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>=20> --------------------------------------------------------- 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---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
Donovan Brooke
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:
Re2: Calculating multiple shipping... (1997)
carriage returns in data (1997)
Bug in capitalize ... ? (2003)
Re:WebMerchant 3.0 for Mac shipping now (1998)
Question about the database (was Message Boards) (2003)
Logical and or in [hideif] (1997)
[append] problems (2003)
[WebDNA] Where is Speed Test? (2009)
WebCatalog can't find database (1997)
setitems, one more thing (1997)
Emailer problem (1998)
Configuring E-mail (1997)
Error: Too many nested [xxx] contexts (WebTen only) (1997)
RAM variables (1997)
WebMerchant 1.6 and https (1997)
Reenter store and find cart (2003)
OPEN MARKET PATENTS SOUND ECOMMERCE ALARM (1998)
OT: TinyMCE (2006)
WebDNA & Apache 1.3.27 (2003)
WebCat2 several catalogs? (1997)