Use New operator instead of CreateObject?

Description

ACF defaults are not set in the CFC if they are created from CreateObject(). They are only set if they are instantiated with the 'new' operator.

https://bugbase.adobe.com/index.cfm?event=bug&id=4137849

Activity

Show:
Brad Wood
April 9, 2016, 1:16 AM
Luis Majano
April 9, 2016, 3:34 AM

The problem to using `new` is that WireBox cannot call the constructor until it discovers the constructor instances. Therefore it leverages createobject first and then calls the constructor.

Brad Wood
April 11, 2016, 5:17 PM

Can you explain what you mean ? Are you talking about a scenario in which a developer tells WireBox to use a custom name like "myAwesomeInit()" instead of the default method called "init()"?

If so, I'd be interested if even a single developer has ever used that feature. Even if so, would it be likely that they would also have a method called init() that they didn't want called by default? I think we should be guiding developers to the "init" standard and away from the legacy weirdness of createObject().

Luis Majano
September 21, 2016, 7:44 PM

There are situations where I do not want the constructor called first.

Won't Fix

Assignee

Luis Majano

Reporter

Henry Ho

Labels

None

Components

Affects versions

Priority

Minor
Configure