RE: Dynamic variable name (WAS: XML Variable Issue)

2005-01-18 Thread James Smith
OK, well while on the subject of doing things the correct way, how would you
set this value?

cfset config.siteConfig.siteSections.#url.SectionName#.XMLText = True

works, but is there a better/cleaner way?

  Yey, cfif 
  IsDefined(Config.SiteConfig.SiteSections.#Sections.Name#)
  works fine!
 
 cfif structKeyExists(config.siteConfig.siteSections,sections.name)
 
 Faster, safer. Do a Google search for isDefined and CGI scope 
 to see why structKeyExists is better.



~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190888
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Dynamic variable name (WAS: XML Variable Issue)

2005-01-18 Thread Pascal Peters
You could do 
cfset config.siteConfig.siteSections[url.SectionName].XMLText = True

 -Original Message-
 From: James Smith [mailto:[EMAIL PROTECTED]
 Sent: 18 January 2005 10:59
 To: CF-Talk
 Subject: RE: Dynamic variable name (WAS: XML Variable Issue)
 
 OK, well while on the subject of doing things the correct way, how
would
 you
 set this value?
 
 cfset config.siteConfig.siteSections.#url.SectionName#.XMLText =
True
 
 works, but is there a better/cleaner way?
 
   Yey, cfif
   IsDefined(Config.SiteConfig.SiteSections.#Sections.Name#)
   works fine!
 
  cfif structKeyExists(config.siteConfig.siteSections,sections.name)
 
  Faster, safer. Do a Google search for isDefined and CGI scope
  to see why structKeyExists is better.
 
 
 
 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190889
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dynamic variable name (WAS: XML Variable Issue)

2005-01-18 Thread Adam Haskell
When dealing with structures (or XML since most of the time XML
objects can be dealt with like you deal with structures) a good rule
of thumb is to us the . (request.page_id) when you know what you are
looking for and to use the [] (request[something]) when you are using
a variable to evaluate what you are looking for, so in
request[something] something would be a vadiable containing page_id.
Hope that helps.

Adam H


On Tue, 18 Jan 2005 09:58:52 -, James Smith [EMAIL PROTECTED] wrote:
 OK, well while on the subject of doing things the correct way, how would you
 set this value?
 
 cfset config.siteConfig.siteSections.#url.SectionName#.XMLText = True
 
 works, but is there a better/cleaner way?
 
   Yey, cfif
   IsDefined(Config.SiteConfig.SiteSections.#Sections.Name#)
   works fine!
 
  cfif structKeyExists(config.siteConfig.siteSections,sections.name)
 
  Faster, safer. Do a Google search for isDefined and CGI scope
  to see why structKeyExists is better.
 
 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190903
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


XML Variable Issue

2005-01-17 Thread James Smith
I am trying to store some config info in an XML file.

If I run the following code...
cfoutput#Config.SiteConfig.SiteSections.UserManager#/cfoutput

The expected result...
True 
Is output to the browser, however the following code samples...
cfif Config.SiteConfig.SiteSections.UserManager
cfif Config.SiteConfig.SiteSections.UserManager IS TRUE
cfif Config.SiteConfig.SiteSections.UserManager IS TRUE
All fail.

Anyone any idea what I am doing wrong?  The XML file contains the line
UserManagerTrue/UserManager

--
Jay



~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190738
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: XML Variable Issue

2005-01-17 Thread RADEMAKERS Tanguy
How do they fail? Do you get an error message, or do the CFIF's not
execute?

/t 

-Original Message-
From: James Smith [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 17, 2005 5:01 PM
To: CF-Talk
Subject: XML Variable Issue

I am trying to store some config info in an XML file.

If I run the following code...
cfoutput#Config.SiteConfig.SiteSections.UserManager#/cfoutput

The expected result...
True 
Is output to the browser, however the following code samples...
cfif Config.SiteConfig.SiteSections.UserManager
cfif Config.SiteConfig.SiteSections.UserManager IS TRUE
cfif Config.SiteConfig.SiteSections.UserManager IS TRUE
All fail.

Anyone any idea what I am doing wrong?  The XML file contains the line
UserManagerTrue/UserManager

--
Jay





~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190740
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: XML Variable Issue

2005-01-17 Thread Nick de Voil
 If I run the following code...
 cfoutput#Config.SiteConfig.SiteSections.UserManager#/cfoutput
 
 The expected result...
 True 
 Is output to the browser, however the following code samples...
 cfif Config.SiteConfig.SiteSections.UserManager
 cfif Config.SiteConfig.SiteSections.UserManager IS TRUE
 cfif Config.SiteConfig.SiteSections.UserManager IS TRUE
 All fail.
 
 Anyone any idea what I am doing wrong?  The XML file contains the line
 UserManagerTrue/UserManager

How about

cfif Config.SiteConfig.SiteSections.UserManager is True

Nick



~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190742
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: XML Variable Issue

2005-01-17 Thread James Smith
The first throws an error (cannot convert the value of type class
coldfusion.xml.XmlNodeList to a boolean), the other two both evaluate to
false and skip the codeblock.

 How do they fail? Do you get an error message, or do the 
 CFIF's not execute?

 I am trying to store some config info in an XML file.
 
 If I run the following code...
 cfoutput#Config.SiteConfig.SiteSections.UserManager#/cfoutput
 
 The expected result...
 True
 Is output to the browser, however the following code samples...
 cfif Config.SiteConfig.SiteSections.UserManager
 cfif Config.SiteConfig.SiteSections.UserManager IS TRUE cfif 
 Config.SiteConfig.SiteSections.UserManager IS TRUE All fail.
 
 Anyone any idea what I am doing wrong?  The XML file 
 contains the line 
 UserManagerTrue/UserManager



~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190749
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: XML Variable Issue

2005-01-17 Thread Andrew Dixon
Hi.

If you are using it like that you need to .XmlText on the end to get
the XmlText part of the XmlNode.

Config.SiteConfig.SiteSections.UserManager.XmlText

And as it is text and not a boolean value I think you will need to use:

 cfif Config.SiteConfig.SiteSections.UserManager.XmlText IS TRUE 

Andrew.

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190750
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: XML Variable Issue

2005-01-17 Thread Ian Skinner
Try cfif Config.SiteConfig.SiteSections.UserManager.xmlText, otherwise you are 
returning the entire node, not the value of the node.


--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

C code. C code run. Run code run. Please!
- Cynthia Dunning



...-Original Message-
...From: James Smith [mailto:[EMAIL PROTECTED]
...Sent: Monday, January 17, 2005 8:39 AM
...To: CF-Talk
...Subject: RE: XML Variable Issue
...
...The first throws an error (cannot convert the value of type class
...coldfusion.xml.XmlNodeList to a boolean), the other two both evaluate to
...false and skip the codeblock.
...
... How do they fail? Do you get an error message, or do the
... CFIF's not execute?
...
... I am trying to store some config info in an XML file.
... 
... If I run the following code...
... cfoutput#Config.SiteConfig.SiteSections.UserManager#/cfoutput
... 
... The expected result...
... True
... Is output to the browser, however the following code samples...
... cfif Config.SiteConfig.SiteSections.UserManager
... cfif Config.SiteConfig.SiteSections.UserManager IS TRUE cfif
... Config.SiteConfig.SiteSections.UserManager IS TRUE All fail.
... 
... Anyone any idea what I am doing wrong?  The XML file
... contains the line
... UserManagerTrue/UserManager
...
...
...
...

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190752
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: XML Variable Issue

2005-01-17 Thread James Smith
Perfect, that fixed it thanks.  FYI: it works fine as a boolean value as
well now.

--
Jay 

 -Original Message-
 From: Andrew Dixon [mailto:[EMAIL PROTECTED] 
 Sent: 17 January 2005 16:43
 To: CF-Talk
 Subject: Re: XML Variable Issue
 
 Hi.
 
 If you are using it like that you need to .XmlText on the end 
 to get the XmlText part of the XmlNode.
 
 Config.SiteConfig.SiteSections.UserManager.XmlText
 
 And as it is text and not a boolean value I think you will 
 need to use:
 
  cfif Config.SiteConfig.SiteSections.UserManager.XmlText IS TRUE 
 
 Andrew.
 
 

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190753
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: XML Variable Issue

2005-01-17 Thread RADEMAKERS Tanguy
try this:

cfdump var=#Config.SiteConfig.SiteSections.UserManager#

see anything like toString()?

/t

 

-Original Message-
From: James Smith [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 17, 2005 5:39 PM
To: CF-Talk
Subject: RE: XML Variable Issue

The first throws an error (cannot convert the value of type class
coldfusion.xml.XmlNodeList to a boolean), the other two both 
evaluate to
false and skip the codeblock.

 How do they fail? Do you get an error message, or do the 
 CFIF's not execute?

 I am trying to store some config info in an XML file.
 
 If I run the following code...
 cfoutput#Config.SiteConfig.SiteSections.UserManager#/cfoutput
 
 The expected result...
 True
 Is output to the browser, however the following code samples...
 cfif Config.SiteConfig.SiteSections.UserManager
 cfif Config.SiteConfig.SiteSections.UserManager IS TRUE cfif 
 Config.SiteConfig.SiteSections.UserManager IS TRUE All fail.
 
 Anyone any idea what I am doing wrong?  The XML file 
 contains the line 
 UserManagerTrue/UserManager





~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190755
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread James Smith
A related issue (at a completely diferent point in the code)...

If the SectionName is dynamic, how would you access the variable?

For example the Variable name
Config.SiteConfig.SiteSections.UserManager.XmlText has the UserManager
part in another variable called Sections.Name.  I have tried many options
and variations with no success and I know this is easy as I have done it
before (although not from XML) and I can't remember how!

EG:
cfif parameterExists(Config.SiteConfig.SiteSections.#Sections.Name#)
cfif parameterExists(evaluate(Config.SiteConfig.SiteSections. 
Sections.Name))

--
Jay

 If you are using it like that you need to .XmlText on the end 
 to get the XmlText part of the XmlNode.
 
 Config.SiteConfig.SiteSections.UserManager.XmlText
 
 And as it is text and not a boolean value I think you will 
 need to use:
 
  cfif Config.SiteConfig.SiteSections.UserManager.XmlText IS TRUE 
 
 Andrew.



~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190759
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread Ian Skinner
Bracket [] notation.

Config.SiteConfig.SiteSections[Sections.Name]


--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

C code. C code run. Run code run. Please!
- Cynthia Dunning



...-Original Message-
...From: James Smith [mailto:[EMAIL PROTECTED]
...Sent: Monday, January 17, 2005 8:56 AM
...To: CF-Talk
...Subject: Dynamic variable name (WAS: XML Variable Issue)
...
...A related issue (at a completely diferent point in the code)...
...
...If the SectionName is dynamic, how would you access the variable?
...
...For example the Variable name
...Config.SiteConfig.SiteSections.UserManager.XmlText has the
...UserManager
...part in another variable called Sections.Name.  I have tried many
...options
...and variations with no success and I know this is easy as I have done it
...before (although not from XML) and I can't remember how!
...
...EG:
...cfif parameterExists(Config.SiteConfig.SiteSections.#Sections.Name#)
...cfif parameterExists(evaluate(Config.SiteConfig.SiteSections. 
...Sections.Name))
...
...--
...Jay
...
... If you are using it like that you need to .XmlText on the end
... to get the XmlText part of the XmlNode.
...
... Config.SiteConfig.SiteSections.UserManager.XmlText
...
... And as it is text and not a boolean value I think you will
... need to use:
...
...  cfif Config.SiteConfig.SiteSections.UserManager.XmlText IS TRUE
...
... Andrew.
...
...
...
...

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190763
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread James Smith
Unfortunately...

cfif parameterExists(Config.SiteConfig.SiteSections[Sections.Name])

Throws an error (Invalid CFML construct found on line 13 at column 83.) 

--
Jay

 Bracket [] notation.
 
 Config.SiteConfig.SiteSections[Sections.Name]

 ...If the SectionName is dynamic, how would you access the variable?
 ...
 ...For example the Variable name
 ...Config.SiteConfig.SiteSections.UserManager.XmlText has 
 the ...UserManager
 ...part in another variable called Sections.Name.  I have 
 tried many ...options ...and variations with no success and I 
 know this is easy as I have done it ...before (although not 
 from XML) and I can't remember how!
 ...
 ...EG:
 ...cfif 
 parameterExists(Config.SiteConfig.SiteSections.#Sections.Name#)
 ...cfif 
 parameterExists(evaluate(Config.SiteConfig.SiteSections.  
 ...Sections.Name)) ...
 ...--
 ...Jay
 ...



~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190767
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread Adam Haskell
useless_rant
ok unless you sare on some oooddd version why would you be using
this functionparameterExists
/useless_rant

Adam H 

On Mon, 17 Jan 2005 17:08:03 -, James Smith [EMAIL PROTECTED] wrote:
 Unfortunately...
 
 cfif parameterExists(Config.SiteConfig.SiteSections[Sections.Name])
 
 Throws an error (Invalid CFML construct found on line 13 at column 83.)
 
 --
 Jay
 
  Bracket [] notation.
 
  Config.SiteConfig.SiteSections[Sections.Name]
 
  ...If the SectionName is dynamic, how would you access the variable?
  ...
  ...For example the Variable name
  ...Config.SiteConfig.SiteSections.UserManager.XmlText has
  the ...UserManager
  ...part in another variable called Sections.Name.  I have
  tried many ...options ...and variations with no success and I
  know this is easy as I have done it ...before (although not
  from XML) and I can't remember how!
  ...
  ...EG:
  ...cfif
  parameterExists(Config.SiteConfig.SiteSections.#Sections.Name#)
  ...cfif
  parameterExists(evaluate(Config.SiteConfig.SiteSections. 
  ...Sections.Name)) ...
  ...--
  ...Jay
  ...
 
 
 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190772
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread James Smith
Although
cfoutput#Config.SiteConfig.SiteSections[Sections.Name]#/cfoutput works
fine!  HELP! How can one error and the other work! I don't get it!

-- 
Jay

 -Original Message-
 From: James Smith [mailto:[EMAIL PROTECTED] 
 Sent: 17 January 2005 17:08
 To: CF-Talk
 Subject: RE: Dynamic variable name (WAS: XML Variable Issue)
 
 Unfortunately...
 
 cfif parameterExists(Config.SiteConfig.SiteSections[Sections.Name])
 
 Throws an error (Invalid CFML construct found on line 13 at 
 column 83.) 
 
 --
 Jay
 
  Bracket [] notation.
  
  Config.SiteConfig.SiteSections[Sections.Name]
 
  ...If the SectionName is dynamic, how would you access the variable?
  ...
  ...For example the Variable name
  ...Config.SiteConfig.SiteSections.UserManager.XmlText has the 
  ...UserManager
  ...part in another variable called Sections.Name.  I have 
 tried many 
  ...options ...and variations with no success and I know 
 this is easy 
  as I have done it ...before (although not from XML) and I can't 
  remember how!
  ...
  ...EG:
  ...cfif
  parameterExists(Config.SiteConfig.SiteSections.#Sections.Name#)
  ...cfif
  parameterExists(evaluate(Config.SiteConfig.SiteSections.  
  ...Sections.Name)) ...
  ...--
  ...Jay
  ...
 
 
 
 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190776
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread James Smith
Sorry, what is wrong with parameterExists()?  Has it been depreciated
without me knowing?

--
Jay 

 -Original Message-
 From: Adam Haskell [mailto:[EMAIL PROTECTED] 
 Sent: 17 January 2005 17:17
 To: CF-Talk
 Subject: Re: Dynamic variable name (WAS: XML Variable Issue)
 
 useless_rant
 ok unless you sare on some oooddd version why would you 
 be using this functionparameterExists
 /useless_rant
 
 Adam H 
 
 On Mon, 17 Jan 2005 17:08:03 -, James Smith 
 [EMAIL PROTECTED] wrote:
  Unfortunately...
  
  cfif 
 parameterExists(Config.SiteConfig.SiteSections[Sections.Name])
  
  Throws an error (Invalid CFML construct found on line 13 at column 
  83.)
  
  --
  Jay
  
   Bracket [] notation.
  
   Config.SiteConfig.SiteSections[Sections.Name]
  
   ...If the SectionName is dynamic, how would you access 
 the variable?
   ...
   ...For example the Variable name
   ...Config.SiteConfig.SiteSections.UserManager.XmlText has the 
   ...UserManager
   ...part in another variable called Sections.Name.  I have tried 
   many ...options ...and variations with no success and I 
 know this is 
   easy as I have done it ...before (although not from XML) 
 and I can't 
   remember how!
   ...
   ...EG:
   ...cfif
   parameterExists(Config.SiteConfig.SiteSections.#Sections.Name#)
   ...cfif
   parameterExists(evaluate(Config.SiteConfig.SiteSections.  
   ...Sections.Name)) ...
   ...--
   ...Jay
   ...
  
  
  
 
 

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190777
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread James Smith
What do you know, apparently is has, teach me to browse the docs from time
to time eh!

--
Jay 

 -Original Message-
 From: James Smith [mailto:[EMAIL PROTECTED] 
 Sent: 17 January 2005 17:21
 To: CF-Talk
 Subject: RE: Dynamic variable name (WAS: XML Variable Issue)
 
 Sorry, what is wrong with parameterExists()?  Has it been 
 depreciated without me knowing?
 
 --
 Jay 
 
  -Original Message-
  From: Adam Haskell [mailto:[EMAIL PROTECTED]
  Sent: 17 January 2005 17:17
  To: CF-Talk
  Subject: Re: Dynamic variable name (WAS: XML Variable Issue)
  
  useless_rant
  ok unless you sare on some oooddd version why would you 
 be using 
  this functionparameterExists
  /useless_rant
  
  Adam H
  
  On Mon, 17 Jan 2005 17:08:03 -, James Smith 
 [EMAIL PROTECTED] 
  wrote:
   Unfortunately...
   
   cfif
  parameterExists(Config.SiteConfig.SiteSections[Sections.Name])
   
   Throws an error (Invalid CFML construct found on line 13 at column
   83.)
   
   --
   Jay
   
Bracket [] notation.
   
Config.SiteConfig.SiteSections[Sections.Name]
   
...If the SectionName is dynamic, how would you access
  the variable?
...
...For example the Variable name
...Config.SiteConfig.SiteSections.UserManager.XmlText has the 
...UserManager
...part in another variable called Sections.Name.  I 
 have tried 
many ...options ...and variations with no success and I
  know this is
easy as I have done it ...before (although not from XML)
  and I can't
remember how!
...
...EG:
...cfif
parameterExists(Config.SiteConfig.SiteSections.#Sections.Name#)
...cfif
parameterExists(evaluate(Config.SiteConfig.SiteSections.  
...Sections.Name)) ...
...--
...Jay
...
   
   
   
  
  
 
 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190778
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread James Smith
Yey, cfif IsDefined(Config.SiteConfig.SiteSections.#Sections.Name#)
works fine!

--
Jay 
 

 -Original Message-
 From: James Smith [mailto:[EMAIL PROTECTED] 
 Sent: 17 January 2005 17:24
 To: CF-Talk
 Subject: RE: Dynamic variable name (WAS: XML Variable Issue)
 
 What do you know, apparently is has, teach me to browse the 
 docs from time to time eh!
 
 --
 Jay 
 
  -Original Message-
  From: James Smith [mailto:[EMAIL PROTECTED]
  Sent: 17 January 2005 17:21
  To: CF-Talk
  Subject: RE: Dynamic variable name (WAS: XML Variable Issue)
  
  Sorry, what is wrong with parameterExists()?  Has it been 
 depreciated 
  without me knowing?
  
  --
  Jay
  
   -Original Message-
   From: Adam Haskell [mailto:[EMAIL PROTECTED]
   Sent: 17 January 2005 17:17
   To: CF-Talk
   Subject: Re: Dynamic variable name (WAS: XML Variable Issue)
   
   useless_rant
   ok unless you sare on some oooddd version why would you
  be using
   this functionparameterExists
   /useless_rant
   
   Adam H
   
   On Mon, 17 Jan 2005 17:08:03 -, James Smith
  [EMAIL PROTECTED]
   wrote:
Unfortunately...

cfif
   parameterExists(Config.SiteConfig.SiteSections[Sections.Name])

Throws an error (Invalid CFML construct found on line 
 13 at column
83.)

--
Jay

 Bracket [] notation.

 Config.SiteConfig.SiteSections[Sections.Name]

 ...If the SectionName is dynamic, how would you access
   the variable?
 ...
 ...For example the Variable name 
 
 ...Config.SiteConfig.SiteSections.UserManager.XmlText has the 
 ...UserManager
 ...part in another variable called Sections.Name.  I
  have tried
 many ...options ...and variations with no success and I
   know this is
 easy as I have done it ...before (although not from XML)
   and I can't
 remember how!
 ...
 ...EG:
 ...cfif
 
 parameterExists(Config.SiteConfig.SiteSections.#Sections.Name#)
 ...cfif
 parameterExists(evaluate(Config.SiteConfig.SiteSections.  
 ...Sections.Name)) ...
 ...--
 ...Jay
 ...



   
   
  
  
 
 

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190780
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread Sean Corfield
On Mon, 17 Jan 2005 17:26:45 -, James Smith [EMAIL PROTECTED] wrote:
 Yey, cfif IsDefined(Config.SiteConfig.SiteSections.#Sections.Name#)
 works fine!

cfif structKeyExists(config.siteConfig.siteSections,sections.name)

Faster, safer. Do a Google search for isDefined and CGI scope to see
why structKeyExists is better.
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 5 invites to give away!

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190782
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dynamic variable name (WAS: XML Variable Issue)

2005-01-17 Thread Adam Haskell
Yes sorry guess I shoulda been a little more explicite in what to do
instead of parameterexists instead of just ranting heh

Adam H


On Mon, 17 Jan 2005 09:36:41 -0800, Sean Corfield
[EMAIL PROTECTED] wrote:
 On Mon, 17 Jan 2005 17:26:45 -, James Smith [EMAIL PROTECTED] wrote:
  Yey, cfif IsDefined(Config.SiteConfig.SiteSections.#Sections.Name#)
  works fine!
 
 cfif structKeyExists(config.siteConfig.siteSections,sections.name)
 
 Faster, safer. Do a Google search for isDefined and CGI scope to see
 why structKeyExists is better.
 --
 Sean A Corfield -- http://www.corfield.org/
 Team Fusebox -- http://www.fusebox.org/
 Breeze Me! -- http://www.corfield.org/breezeme
 Got Gmail? -- I have 5 invites to give away!
 
 If you're not annoying somebody, you're not really alive.
 -- Margaret Atwood
 
 

~|
Logware: a new and convenient web-based time tracking application. Start 
tracking and documenting hours spent on a project or with a client with Logware 
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190797
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54