Re: Unexpected comparison behavior change in 4.5.1

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 48749
interpreted = N
texte = This is all well and good, but totally beside the point of my original query.Can SMSI or anyone else on the list please verify that they see the same difference as I do between the behavior of 4.5.0 and earlier versus 4.5.1 on this code:[showif bob^]or[if bob^] In my tests, these evaluate to true under 4.5.0 and earlier, and to false under 4.5.1. Clearly URL is not the issue here.I've worked around the problem in the situation where I noticed the discrepancy (this is in a piece of code that must work in multiple environments), though it is possible I'll see other code of mine break if I move it to 4.5.1SMSI: Was this an intentional change, or accidental? Which behavior can we expect in version 5?Inquiring minds want to know...- brian On Monday, March 17, 2003, at 08:24 PM, Alain Russell wrote:> Yes we got stung by this on our CMS when a client wanted to put every > single > second heading like New Products! .. > >> As Alain noted, it is very important to [URL] the variable otherwise >> you will get errant results. >> >> For example if you have this: >> >> [ShowIf [variable]=]BLANK VARIABLE[/ShowIf] >> >> and the variable is: here is the variable! >> >> It will NOT work as the exclamation screws the WebDNA and the result >> will show BLANK VARIABLE. >> >> If you [URL] the variable the WebDNA WILL work as expected. >> >> [ShowIf [URL][variable][/URL]=]BLANK VARIABLE[/ShowIf] >> >> >> >> >> On Saturday, March 15, 2003, at 09:39 PM, Gary Krockover wrote: >> >>> Yeah, noticed that too, and FWIW, I've added this to my code snippets >>> in >>> EditPlus: >>> >>> [showif [variable]!][showif >>> [variable]![raw][variable][/raw]][variable][/showif][/showif] >>> >>> GK >>> >>> P.S. I'm working on the interactive WebDNA reference. I should >>> have a >>> beta of that up sometime today. The nice thing is that the actual >>> pages of >>> the commands/contexts are displayed in an iframe from >>> http://webdnadocs.smithmicro.com/, so whenever they update their >>> docs, >>> it's >>> updated on this version as well. Notes can be appended to the bottom >>> of >>> each page for code snippets, examples, gotcha's, etc. I'll keep you >>> all >>> posted.... >>> >>> >>> >>>> I tend to agree here .. the correct way to check if a variable >>> contains/does >>>> not contain something >>>> >>>> [showif [url][variable][/url]=] ..... >>>> [showif [url][variable][/url]!].... >>>> >>>> Alain >>>> >>>> ----- Original Message ----- >>>> From: Tim Robinson >>>> To: WebDNA Talk >>>> Sent: Saturday, March 15, 2003 11:26 PM >>>> Subject: Re: Unexpected comparison behavior change in 4.5.1 >>>> >>>> >>>>> Maybe this is a fix rather than a bug... A value can equal blank, >>>>> but >>> can >>>> a >>>>> non-blank value contain a blank? I wouldn't think so. That would be >>>>> my >>>>> thinking anyway. >>>>> >>>>> Tim >>>>> >>>>>> From: Brian Fries >>>>>> Reply-To: (WebDNA Talk) >>>>>> Date: Sat, 15 Mar 2003 00:30:40 -0800 >>>>>> To: (WebDNA Talk) >>>>>> Subject: Unexpected comparison behavior change in 4.5.1 >>>>>> >>>>>> Running WebDNA 4.5.1 on OSX, I'm finding an unexpected and >>>>>> undesirable >>>>>> change in the behavior of IF and SHOWIF contains comparisons >>>>>> when >>> the >>>>>> value being tested for is blank. >>>>>> >>>>>> I ran this code on three servers - OSX / 4.5.0, OS9 / 4.0.2 and >>>>>> OSX >>>>>> / >>>>>> 4.5.1: >>>>>> >>>>>> [showif bob^]yes[/showif][hideif bob^]no[/hideif]
>>>>>> [if bob^][then]yo[/then][else]nah[/else][/if]
>>>>>> >>>>>> On both the 4.5.0 and 4.0.2 systems, it returns: >>>>>> yes >>>>>> yo >>>>>> >>>>>> On the 4.5.1 system, it returns: >>>>>> no >>>>>> nah >>>>>> >>>>>> >>>>>> Can I get confirmation from SMSI and/or other users that this is a >>>>>> bug >>>>>> introduced in 4.5.1? >>>>>> >>>>>> - brian >>>>>> >>>>>> -- Brian Fries, BrainScan Software -- >>> http://www.brainscansoftware.com >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> >> Regards >> >> Stuart Tremain >> idfk web developments >> 114a/40 yeo street neutral bay 2089 australia >> t +612 9908 2134 >> f +612 9908 4837 >> >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Unexpected comparison behavior change in 4.5.1 (John Peacock 2003)
  2. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  3. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  4. Re: Unexpected comparison behavior change in 4.5.1 (Velma Kahn 2003)
  5. Re: Unexpected comparison behavior change in 4.5.1 (Clint Davis 2003)
  6. Re: Unexpected comparison behavior change in 4.5.1 (Clint Davis 2003)
  7. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  8. Re: Unexpected comparison behavior change in 4.5.1 (Velma Kahn 2003)
  9. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  10. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  11. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  12. Re: Unexpected comparison behavior change in 4.5.1 (Kenneth Grome 2003)
  13. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  14. Re: Unexpected comparison behavior change in 4.5.1 (Charles Kline 2003)
  15. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  16. Re: Unexpected comparison behavior change in 4.5.1 (Alain Russell 2003)
  17. Re: Unexpected comparison behavior change in 4.5.1 (Stuart Tremain 2003)
  18. Re: Unexpected comparison behavior change in 4.5.1 (Rob Marquardt 2003)
  19. Re: Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
  20. Re: Unexpected comparison behavior change in 4.5.1 (Gary Krockover 2003)
  21. Re: Unexpected comparison behavior change in 4.5.1 (Alain Russell 2003)
  22. Re: Unexpected comparison behavior change in 4.5.1 (Tim Robinson 2003)
  23. Unexpected comparison behavior change in 4.5.1 (Brian Fries 2003)
This is all well and good, but totally beside the point of my original query.Can SMSI or anyone else on the list please verify that they see the same difference as I do between the behavior of 4.5.0 and earlier versus 4.5.1 on this code:[showif bob^]or[if bob^] In my tests, these evaluate to true under 4.5.0 and earlier, and to false under 4.5.1. Clearly URL is not the issue here.I've worked around the problem in the situation where I noticed the discrepancy (this is in a piece of code that must work in multiple environments), though it is possible I'll see other code of mine break if I move it to 4.5.1SMSI: Was this an intentional change, or accidental? Which behavior can we expect in version 5?Inquiring minds want to know...- brian On Monday, March 17, 2003, at 08:24 PM, Alain Russell wrote:> Yes we got stung by this on our CMS when a client wanted to put every > single > second heading like New Products! .. > >> As Alain noted, it is very important to [url] the variable otherwise >> you will get errant results. >> >> For example if you have this: >> >> [ShowIf [variable]=]BLANK VARIABLE[/ShowIf] >> >> and the variable is: here is the variable! >> >> It will NOT work as the exclamation screws the WebDNA and the result >> will show BLANK VARIABLE. >> >> If you [url] the variable the WebDNA WILL work as expected. >> >> [ShowIf [url][variable][/URL]=]BLANK VARIABLE[/ShowIf] >> >> >> >> >> On Saturday, March 15, 2003, at 09:39 PM, Gary Krockover wrote: >> >>> Yeah, noticed that too, and FWIW, I've added this to my code snippets >>> in >>> EditPlus: >>> >>> [showif [variable]!][showif >>> [variable]![raw][variable][/raw]][variable][/showif][/showif] >>> >>> GK >>> >>> P.S. I'm working on the interactive WebDNA reference. I should >>> have a >>> beta of that up sometime today. The nice thing is that the actual >>> pages of >>> the commands/contexts are displayed in an iframe from >>> http://webdnadocs.smithmicro.com/, so whenever they update their >>> docs, >>> it's >>> updated on this version as well. Notes can be appended to the bottom >>> of >>> each page for code snippets, examples, gotcha's, etc. I'll keep you >>> all >>> posted.... >>> >>> >>> >>>> I tend to agree here .. the correct way to check if a variable >>> contains/does >>>> not contain something >>>> >>>> [showif [url][variable][/url]=] ..... >>>> [showif [url][variable][/url]!].... >>>> >>>> Alain >>>> >>>> ----- Original Message ----- >>>> From: Tim Robinson >>>> To: WebDNA Talk >>>> Sent: Saturday, March 15, 2003 11:26 PM >>>> Subject: Re: Unexpected comparison behavior change in 4.5.1 >>>> >>>> >>>>> Maybe this is a fix rather than a bug... A value can equal blank, >>>>> but >>> can >>>> a >>>>> non-blank value contain a blank? I wouldn't think so. That would be >>>>> my >>>>> thinking anyway. >>>>> >>>>> Tim >>>>> >>>>>> From: Brian Fries >>>>>> Reply-To: (WebDNA Talk) >>>>>> Date: Sat, 15 Mar 2003 00:30:40 -0800 >>>>>> To: (WebDNA Talk) >>>>>> Subject: Unexpected comparison behavior change in 4.5.1 >>>>>> >>>>>> Running WebDNA 4.5.1 on OSX, I'm finding an unexpected and >>>>>> undesirable >>>>>> change in the behavior of IF and SHOWIF contains comparisons >>>>>> when >>> the >>>>>> value being tested for is blank. >>>>>> >>>>>> I ran this code on three servers - OSX / 4.5.0, OS9 / 4.0.2 and >>>>>> OSX >>>>>> / >>>>>> 4.5.1: >>>>>> >>>>>> [showif bob^]yes[/showif][hideif bob^]no[/hideif]
>>>>>> [if bob^][then]yo[/then][else]nah[/else][/if]
>>>>>> >>>>>> On both the 4.5.0 and 4.0.2 systems, it returns: >>>>>> yes >>>>>> yo >>>>>> >>>>>> On the 4.5.1 system, it returns: >>>>>> no >>>>>> nah >>>>>> >>>>>> >>>>>> Can I get confirmation from SMSI and/or other users that this is a >>>>>> bug >>>>>> introduced in 4.5.1? >>>>>> >>>>>> - brian >>>>>> >>>>>> -- Brian Fries, BrainScan Software -- >>> http://www.brainscansoftware.com >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> >> Regards >> >> Stuart Tremain >> idfk web developments >> 114a/40 yeo street neutral bay 2089 australia >> t +612 9908 2134 >> f +612 9908 4837 >> >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Brian Fries

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:

Changing in a founditems tag (1999) Blog Software (2006) Banner Ad example (Typhoon) and WebCatalog (1997) [WebDNA] line/Row Insert (2017) A multi-processor savvy WebCatalog? (1997) Credit Card not accepted (1998) AE aware WebCatalog.acgi? (1997) Sending emails (went[ot] ) (2002) WebCat2b13MacPlugIn - [include] (1997) RE: error count with $purchase (1997) [convertchars] limits (1998) [delete] problem (2002) [WebDNA] CICADA (2009) User/Pass dialogue issue [AOL?] (2002) Nested tags count question (1997) WebCat editing, SiteGuard & SiteEdit (1997) Range Comparisons (2000) really wierd browser truncating (1997) Database Options (1997) Help (1999)