Reuben,
I totally understand what you're saying. When I first considered
structures, they seemed like really complicated mechanisms for holding data
that could be just as easily placed into a query or a list.
What I've found, however, is that structures can be incredibly powerful if
you think of them as 'objects' which can contain all of the pertinent data
for that object. Also, as Mike suggests (perhaps a little energetically),
structures really take off when you create nested structures.
I've been working with nested structures to manage navigation elements and
it has made my job so much easier. If I need to add a new nav element, I
just create a new structure that describes that elements attributes (name,
link, image, etc.) and place that struct into the master navigation holding
struct. I make no claims of brilliance, but the site I implemented this on
has experienced quite a few changes and nav changes have been a breeze.
I would encourage you to work with structures a while before you discard
them as useless -- they're used pretty extensively in other languages, so
the concept has proven useful before. Another note: you may want to look
into using CFScript when you manipulate structs. It is TONS easier to use
cfscript than the Struct* functions inside cfset tags.
Good luck!
Kevin
At 01:48 PM 4/20/00 -0500, you wrote:
>Structures seem totally useless to me. If they were two dimensional,
>then I could see definite value. I'd love to see something like:
>
><cfset access_flags["is_superuser"].default_value="false">
><cfset access_flags["is_superuser"].description="Is this user an
>administrator?">
><cfset access_flags["is_superuser"].data_type="boolean">
><cfset access_flags["is_superuser"].user_assignment="true">
>
><cfset access_flags["access_emps"].default_value="false">
><cfset access_flags["access_emps"].description="Does this user have
>access to the employee records?">
><cfset access_flags["access_emps"].data_type="boolean">
><cfset access_flags["access_emps"].user_assignment="true">
>.. etc ...
>
>
>As I understand it right now from reading the CF docs and Forta's books,
>structures are nothing at all but a one dimensional shorthand way of
>passing around a single row of key/value pairs. Am I correct in this?
>
>I guess I'll just use the QueryNew() function and its relatives..
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.