tracker issue : CF-3037105

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 74517:(Watson Migration Closure)Store variables in the case that they are declared when you set them

| View in Tracker

Status/Resolution/Reason: Closed/Deferred/

Reporter/Name(from Bugbase): Brian Kotek / Brian Kotek (brian428)

Created: 12/18/2008

Components: Language

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 4

Problem:

Store variables in the case that they are declared when you set them. For example, this:

<cfset myVar = "foo" />

should do the same thing as <cfset variables['myVar'] = "foo" />

Currently you actually get variables['MYVAR']. This won't change much within CF itself, but for example when sending data to Flex this will make things much cleaner.
Method:


Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3037105

External Customer Info:
External Company:  
External Customer Name: Brian Kotek
External Customer Email: 27EF5CB74460F39E99201549
External Test Config: 12/18/2008

Attachments:

Comments:

+1 vote. I don't think the current behaviour is "predictable", unless one already knows what to expect (so, like, then you'd not have to be predicting, I suppose). If variable names _can_ have their case preserved, then they should be, by default: it's uniformity of behaviour. -- Adam
Vote by External U.
24361 | November 10, 2011 07:09:17 PM GMT
THIS IS ESPECIALLY frustrating with serializeJSON, this change would be brilliant, thanks.
Vote by External U.
24362 | November 10, 2011 07:09:19 PM GMT
It is definitely surprising that mystruct["myVar"] and variables["myVar"] behave differently and it seems unnecessary. If structs can preserve case and lookups continue to work, why should scopes be different?
Vote by External U.
24363 | November 10, 2011 07:09:25 PM GMT
+1 - This is an area for improvement.
Vote by External U.
24364 | November 10, 2011 07:09:27 PM GMT