Re: Hiding Brands
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 57397
interpreted = N
texte = John Peacock wrote:> Donovan Brooke wrote:> >> Logically, A contains showif like:>> [showif _apple_fred_willma_^_ap_]>> yes>> [/showif]>>>> should result to "yes" but it doesn't because thats not how the >> stamenet works.> > > I understand you fine, but you are missing _my_ point. Let me put > quotes around the strings so you can see:> > The string "_ap_" is not present in the strings "_apple_" or "_fred_" or > "_wilma_", so the [showif doesn't fire] The contains operator "^" takes > everything to the right /as a string/ and tries to find it, _exactly_ on > the left hand side, /as a string/; the underlying C routine is call > instr().> > The construct we are talking about is an old trick of wrapping an > unknown value with known characters, then mashing all possible values > together into a single string, seperated by the known character. Only a > single match is desired. You can consider this doing a logical OR using > string operations.Well, I actually understood what you are saying and you state it clearly here.However, what I'm saying is it doesn't really make sense because a contains(substring match) just won't work in an or statement within a showif. for example,you can't check for "ap" in a showif to match either fred willma or apple.Its negating the value of "contains". "^"'s *value* is in the fact that itcan make substring matches...[showif apple^ap] This works[/showif]I'm just saying that it doesn't fit right with the contains.> >> IMO, it would have been more logical to impliment this "feature" in >> the "=" scenerio...>> [hideif _a_b_c_=_[value]_]>> yes>> [/hideif]> > You are missing the point here as well. There is nothing special about > the '_' in this case; any character which isn't also present in either > the choices or the [value] can be used (as long as that character > doesn't have any additional meaning).> > For that matter, this should also work> > [hideif 'a'b'c'd'^'[value]']> > since in that context, the single quote has no special meaning. Don't > try that in an [if] context though.> > Got it now?Well, I've know that one can use any unique character in this statement fora long time (probably since you or rob or someone gave the example several yearsago ;-). If you look at my comment (code) again, I was making the point thatthe showif "or" feature should have been written in conjuction with the "=" peram ratherthan the "^" peram.That way, there would seem to be no confusion and it could be documented.Again, just my opinion...Donovan> > John-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------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:
John Peacock wrote:> Donovan Brooke wrote:> >> Logically, A contains showif like:>> [showif _apple_fred_willma_^_ap_]>> yes>> [/showif]>>>> should result to "yes" but it doesn't because thats not how the >> stamenet works.> > > I understand you fine, but you are missing _my_ point. Let me put > quotes around the strings so you can see:> > The string "_ap_" is not present in the strings "_apple_" or "_fred_" or > "_wilma_", so the [showif doesn't fire] The contains operator "^" takes > everything to the right /as a string/ and tries to find it, _exactly_ on > the left hand side, /as a string/; the underlying C routine is call > instr().> > The construct we are talking about is an old trick of wrapping an > unknown value with known characters, then mashing all possible values > together into a single string, seperated by the known character. Only a > single match is desired. You can consider this doing a logical OR using > string operations.Well, I actually understood what you are saying and you state it clearly here.However, what I'm saying is it doesn't really make sense because a contains(substring match) just won't work in an or statement within a showif. for example,you can't check for "ap" in a showif to match either fred willma or apple.Its negating the value of "contains". "^"'s *value* is in the fact that itcan make substring matches...[showif apple^ap] This works[/showif]I'm just saying that it doesn't fit right with the contains.> >> IMO, it would have been more logical to impliment this "feature" in >> the "=" scenerio...>> [hideif _a_b_c_=_[value]_]>> yes>> [/hideif]> > You are missing the point here as well. There is nothing special about > the '_' in this case; any character which isn't also present in either > the choices or the [value] can be used (as long as that character > doesn't have any additional meaning).> > For that matter, this should also work> > [hideif 'a'b'c'd'^'[value]']> > since in that context, the single quote has no special meaning. Don't > try that in an [if] context though.> > Got it now?Well, I've know that one can use any unique character in this statement fora long time (probably since you or rob or someone gave the example several yearsago ;-). If you look at my comment (code) again, I was making the point thatthe showif "or" feature should have been written in conjuction with the "=" peram ratherthan the "^" peram.That way, there would seem to be no confusion and it could be documented.Again, just my opinion...Donovan> > John-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------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/
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:
[WebDNA] writing pdfs on the fly (Avery labels #5160) (2010)
search form problem.. (1997)
Virtual hosting and webcatNT (1997)
Listserver problem (1997)
WebCat2b13 Command Reference Doc error (1997)
Apple event reply error (-1) (1997)
off topic - dna snipets (1997)
Setting up shop (1997)
Replace context (1998)
MacAuthorize order data fields WAS:How To question... (1997)
IIS4/IIS3 and WebCatalog registry settings (1998)
Checking Webdna is running (2007)
no [search] with NT (1997)
Summing fields (1997)
Multiple prices (1997)
how to construct a search for not this entire string? (2000)
Interactive Online Docs Was: [OT] Mozilla | Was: R.I.P. (2003)
[WebDNA] Web Services Wizard (2008)
WebCat/CyberStudio Compatibility (1998)
still having search problem, please help :) (2004)