Any one having issues with getting a cfproperty va...
# cfml-general
h
Any one having issues with getting a cfproperty variable to be accepted by the ColdFusion 2023 developer engine? I'm right at the start of creating a service so just testing right now. The code I have thus far looks like so:
Copy code
```
//forms.cfc
`component accessors="true"` 
{
    cfproperty (name="db", default="path to dropbox", required="false"  )

    public any function init()
    {
        writeOutput( getDropbox() )

        return this
    }//end

//end component
}
```
In an index.cfm file I try to create an instance using new forms() and I get an error that says: Variable CFPROPERTY is undefined Any idea what gives?
1
b
@hugh Use three back ticks to enclose mulit-line code samples
Copy code
like
this
I also recommend putting code in a thread
Specify a property in script like so
Copy code
component {
  property name="db" default="path to dropbox" required="false";
}
👆 1
👆🏻 1
h
@bdw429s Thanks for that. I'm not new to CF but I thought ACF prefixed everything with CF. I've been using lucee so why I didn't at least try that approach is beyond me right now. I've been on slack before but have hardly used it, so thanks for the back tick suggestion.
b
That is Adobe's generic tag-in-script syntax, btu I don't think they ever made it work for properties. Properties have always had their own first-class construct in script.