do, CFMX automatically creates nested structs. See the documentation
for more information on what changed.
-Matt
On Mar 23, 2004, at 1:11 PM, Jamie Jackson wrote:
> Can someone give me the lowdown on why...
> registrant.emergencyPhone.Phone.countryCode = 1;
> ...is equivalent to...
> registrant["emergencyPhone"]["Phone"]["countryCode"] = 1;
>
> Is this new in CFMX? I used to name variables with dots in them to
> sort of give pseudo-scopes to groups of variable. Maybe it's always
> behaved this way, but I never had occasion to dump one?
>
> This has very strange consequences when doing something like this
> (please try running this form yourself):
>
> <form action="" method="post">
> <input type="hidden" value="123" name="blah.blee.bloo">
> <input type="submit" name="submit" value="submit">
> </form>
> <cfscript>
> form.blah.blee.bloo = 234234;
> </cfscript>
> <cfdump var=#form#>
>
> The dump shows both variables in the form scope, but shows the "true,"
> posted form variable as a simple variable (blah.blee.bloo), but the
> locally set form variable is a structure of structures.
>
> I guess the lesson is not to have dots as delimiters in form vars
> anymore, but can someone explain what's at work here? Also, can I (and
> should I) always expect that this dot notation for structures will
> work, and can I start using (and relying on) that notation?
>
> Thanks,
> Jamie
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

