tracker issue : CF-3037427

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

Bug 75279:Allow string for component name after new operator

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Elliott Sprehn / Elliott Sprehn (Elliott Sprehn)

Created: 02/03/2009

Components: Language

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 222198

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 5


Allow string for component name after new operator.


new "test-cfc.package.#variable#.Component"()

This kills two birds with one stone allowing hyphens and other symbols createObject() allowed,  and also lets you dynamically create objects with the new operator letting CF figure out the initmethod.


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

Watson Bug ID:	3037427

External Customer Info:
External Company:  
External Customer Name: Elliott Sprehn
External Customer Email: 202D59C844579997992016B7
External Test Config: 02/03/2009



This bug has been voted..
Vote by External U.
24061 | November 10, 2011 07:15:41 PM GMT
This bug has been voted..
Vote by External U.
24062 | November 10, 2011 07:15:42 PM GMT
This bug has been voted..
Vote by External U.
24063 | November 10, 2011 07:15:43 PM GMT
This should also be allowed in the import directive. import "*";
Vote by External U.
24064 | November 10, 2011 07:15:44 PM GMT
Since createObject() / cfobject allow constructed component type names, I agree that new() should allow them as well. Both import and new should allow dotted-names and strings (so you're not forced to use quotes when they are not necessary).
Vote by External U.
24065 | November 10, 2011 07:15:45 PM GMT