I
wasn't very clear, let me elaborate;
application.page always there!
application.page.index
application.page.index.blog
application.page.index.blog.archive
anything after
application.page does not always have to be there, i.e. if we are on http://www.tacofleur.com/index/whatever/
it doesn't mean that the structure
index.whatever
exists.
What I do know is
that if the structure is there the key "description" is
there.
I guess where my
problem really comes in is when we are for example
on
And the only page
that exists as a structure is
index.whatever.something.othersomething
It's
still not very clear ;-))
Never
mind, I'll get there, somehow..
Taco
Fleur
0421 851
786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn
Tell me and I will forget
Show me and I will remember
Teach me and I will learn
--------Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Onnis
Sent: Sunday, 11 January 2004 6:30 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: structKeyExistsI would do it like thisstructKeyExists(application,"page['index']['description']")Steve--------Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Taco Fleur
Sent: Sunday, 11 January 2004 6:59 PM
To: CFAussie Mailing List
Subject: [cfaussie] structKeyExistsOK, here's the thing.I know to use structKeyExists instead of isDefined, my problem with structKeyExists is that the structure reference is dynamic, i.e.application.page[ url.page ]so I could check if the key exists on the first level, i.e. it is structKeyExists(application.page["index"], "description")Now if we go another level down in the site it isapplication.page[ url.page ]application.page["index.blog"]If we would go down another level it would beapplication.page["index.blog.archive"] etc. as you can see it can not work with structKeyExistsAt the moment I just catch the error with a cftry, but it's not the cleanest way of doing it I guess.Another funny thing is happening, for example I have two references to a key within a cftry block, and they do not exist, i.e. application.page.index.blog.descriptionIf I do not have a cftry around each call it still generates an error. I have never seen that before, normally (As far as I can remember) it just catched any error within a cftry, whether that is one or two errors.Taco Fleur0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
