I just tested this with the following code:

<cfset myStruct = structNew()>
<cfset myStruct["testing.value"] = "this is a test">
<cfdump var="#variables#" />

Works fine... I still think that my dad's maxim "Just because you can
doesn't mean you should" applies. I'm not a purist by any means, but
putting a dot in a struct key name is pretty drastically off the
beaten path of Best Practices. I wouldn't want to do it in an app
simply based on principle.

Granted, everybody needs to do what must be done to get the app
working... don't NOT do it just because of me. Hehe, yeah right... ;)
Like anyone would take me that seriously.

But, I'd strongly discourage it... there's got to be a Better Way. I
generally abide by Macromedia's published coding guidelines...
standards will make CF a stronger presence in the enterprise
application world, and they're pretty good standards.

Then again, this is my free advice... and you get what you pay for. ;)

Laterz,
J

On Sun, 13 Mar 2005 18:10:57 -0500, Michael T. Tangorre
<[EMAIL PROTECTED]> wrote:
> > From: Jeff Chastain [mailto:[EMAIL PROTECTED]
> > I am needing to create a structure where the key name has a
> > period in it and is not evaluated as a nested structure.
> >
> > For example ...
> >
> >     test.variables.self = 123
> >
> > .... should actually be a structure called 'test' with the
> > key name equal to 'variables.self' and the value equal to 123.
> >
> > I have been able to do this with a very ugly combination of a
> > DE function and a set of string functions, but I was hoping
> > for a cleaner method.
> 
> I don't even recall if a period in a key is valid, but you can try this..
> 
> scop.structName["key.name"] = value
> 
> MIke
> 


-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://cfobjective.neo.servequake.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:198612
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

Reply via email to