Re: [WebDNA] Issue with variable inside a Function

This WebDNA talk-list message is from

2018


It keeps the original formatting.
numero = 114235
interpreted = N
texte = 1838 In programming, respectfully, setting a global constant is a ridiculous=20 thing to do in this situation. Constants, especially global constants, are for server-wide vars that=20 don't change much. I would hate to see WSC recommending their users set temporary, permanent, and server-wide variables on a regular basis. Though I think the idea of '[Store]' has some potential, why would an=20 age-old idea of constants be implemented this way? Why not start with a=20 standard... something like PHP's define. [define blah=3Dblah] or [define scope=3Dglobal blah=3Dblah] Then it's a variable that can't change.. [blah] [:named-global:blah] Constants are relatively easily set anyway and this entire "feature" is=20 really easy to create without a [store] or [define]. Anyway, back to the issue... Palle, I think you'd have to post some code. One of the best things about WebDNA is it's [function] and [scope]=20 contexts... and one of the worst things about WebDNA is it's [function]=20 and [scope] contexts. ;-) .... because... unfortunately, WSC has never properly addressed the full=20 documentation, nor the improvements to these contexts... but if you post=20 your code, some of us may be able to help. Yours Truly, Debby Downer On 2018-05-03 07:44, christophe.billiottet@webdna.us wrote: > Palle, you could use [store] > > - chris > >> On May 3, 2018, at 15:37, Palle Bo Nielsen=20 >> wrote: >> >> Thanks (it works), but how can I make the variable continue to work.=20 >> In this case the Variable has been brought into the Function (which is= =20 >> Ajax JS) but then the variable seems to stop to exist afterwards. And=20 >> in this particular case the next fase is to do some Append off the=20 >> actual variable but also show up in the dynamical Ajax output. >> >> Just need to keep the variable alive :) af the Function/Ajax JS. >> >> /Palle >> >> >> >> >> >>> On 3 May 2018, at 13.50, Stuart Tremain =20 >>> wrote: >>> >>> [ajaxDBentry test_variable=3D44] >>> >>> Regards >>> Stuart Tremain >>> >>> Pharoah Lane Software >>> 7/76 Reserve Road >>> Artarmon NSW 2064 >>> AUSTRALIA >>> +612 8971 4431 >>> >>>> On 3 May 2018, at 9:29 pm, Palle Bo Nielsen=20 >>>> wrote: >>>> >>>> Need a nudge=E2=80=A6 >>>> >>>> Why is the variable not parsed to the function? In other words; I=20 >>>> can se the value of =E2=80=9Ctest_variable=E2=80=9D if I expose it b= efore I call the=20 >>>> Function but not after the Function has been called. >>>> >>>> [text scope=3Dglobal]test_variable=3D44[/text][test_variable] >>>> [ajaxDBEntry] >>>> >>>> /Palle--------------------------------------------------------- >>>> 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://www.webdna.us/page.dna?numero=3D55 >>>> Bug Reporting: support@webdna.us >>> --------------------------------------------------------- >>> 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://www.webdna.us/page.dna?numero=3D55 >>> Bug Reporting: support@webdna.us >> >> --------------------------------------------------------- >> 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://www.webdna.us/page.dna?numero=3D55 >> Bug Reporting: support@webdna.us > > --------------------------------------------------------- > 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://www.webdna.us/page.dna?numero=3D55 > Bug Reporting: support@webdna.us --------------------------------------------------------- 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://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Issue with variable inside a Function (Tom Duke 2018)
  2. Re: [WebDNA] Issue with variable inside a Function (Palle Bo Nielsen 2018)
  3. Re: [WebDNA] Issue with variable inside a Function (Stuart Tremain 2018)
  4. Re: [WebDNA] Issue with variable inside a Function (Palle Bo Nielsen 2018)
  5. Re: [WebDNA] Issue with variable inside a Function (dbrooke@euca.us 2018)
  6. Re: [WebDNA] Issue with variable inside a Function (christophe.billiottet@webdna.us 2018)
  7. Re: [WebDNA] Issue with variable inside a Function (Palle Bo Nielsen 2018)
  8. Re: [WebDNA] Issue with variable inside a Function (Stuart Tremain 2018)
  9. [WebDNA] Issue with variable inside a Function (Palle Bo Nielsen 2018)
1838 In programming, respectfully, setting a global constant is a ridiculous=20 thing to do in this situation. Constants, especially global constants, are for server-wide vars that=20 don't change much. I would hate to see WSC recommending their users set temporary, permanent, and server-wide variables on a regular basis. Though I think the idea of '[store]' has some potential, why would an=20 age-old idea of constants be implemented this way? Why not start with a=20 standard... something like PHP's define. [define blah=3Dblah] or [define scope=3Dglobal blah=3Dblah] Then it's a variable that can't change.. [blah] [:named-global:blah] Constants are relatively easily set anyway and this entire "feature" is=20 really easy to create without a [store] or [define]. Anyway, back to the issue... Palle, I think you'd have to post some code. One of the best things about WebDNA is it's [function] and [scope]=20 contexts... and one of the worst things about WebDNA is it's [function]=20 and [scope] contexts. ;-) .... because... unfortunately, WSC has never properly addressed the full=20 documentation, nor the improvements to these contexts... but if you post=20 your code, some of us may be able to help. Yours Truly, Debby Downer On 2018-05-03 07:44, christophe.billiottet@webdna.us wrote: > Palle, you could use [store] > > - chris > >> On May 3, 2018, at 15:37, Palle Bo Nielsen=20 >> wrote: >> >> Thanks (it works), but how can I make the variable continue to work.=20 >> In this case the Variable has been brought into the Function (which is= =20 >> Ajax JS) but then the variable seems to stop to exist afterwards. And=20 >> in this particular case the next fase is to do some Append off the=20 >> actual variable but also show up in the dynamical Ajax output. >> >> Just need to keep the variable alive :) af the Function/Ajax JS. >> >> /Palle >> >> >> >> >> >>> On 3 May 2018, at 13.50, Stuart Tremain =20 >>> wrote: >>> >>> [ajaxDBentry test_variable=3D44] >>> >>> Regards >>> Stuart Tremain >>> >>> Pharoah Lane Software >>> 7/76 Reserve Road >>> Artarmon NSW 2064 >>> AUSTRALIA >>> +612 8971 4431 >>> >>>> On 3 May 2018, at 9:29 pm, Palle Bo Nielsen=20 >>>> wrote: >>>> >>>> Need a nudge=E2=80=A6 >>>> >>>> Why is the variable not parsed to the function? In other words; I=20 >>>> can se the value of =E2=80=9Ctest_variable=E2=80=9D if I expose it b= efore I call the=20 >>>> Function but not after the Function has been called. >>>> >>>> [text scope=3Dglobal]test_variable=3D44[/text][test_variable] >>>> [ajaxDBEntry] >>>> >>>> /Palle--------------------------------------------------------- >>>> 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://www.webdna.us/page.dna?numero=3D55 >>>> Bug Reporting: support@webdna.us >>> --------------------------------------------------------- >>> 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://www.webdna.us/page.dna?numero=3D55 >>> Bug Reporting: support@webdna.us >> >> --------------------------------------------------------- >> 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://www.webdna.us/page.dna?numero=3D55 >> Bug Reporting: support@webdna.us > > --------------------------------------------------------- > 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://www.webdna.us/page.dna?numero=3D55 > Bug Reporting: support@webdna.us --------------------------------------------------------- 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://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us . dbrooke@euca.us

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:

OT: Weird table rendering w/ WebCat in Explorer (2005) Quickie question on the email templates (1997) proper username/password *w/out* the authenticate dialog. (2000) Need Sample Template - just purchased (1997) Next X hits (1996) serial number (1998) Almost a there but..bye bye NetCloak (1997) Tax Rate (2000) There's a bug in the math context ... (1997) Separate SSL Server (1997) JS and Webcatalog (2001) Table Loop Hoops (2000) email problem (2005) japanese characters (1997) WebCat2 beta 11 - new prefs ... (1997) WebCat2 - many [carts] on one template page? (1997) WebCatalog for guestbook ? (1997) Sorting problem (2002) Dark Horse Comics success story (1997) WebCat2 Append problem (B14Macacgi) (1997)