Skip to content

Instantly share code, notes, and snippets.

@adamcameron
Forked from deltaforce/gist:10072758
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamcameron/10100791 to your computer and use it in GitHub Desktop.
Save adamcameron/10100791 to your computer and use it in GitHub Desktop.
foo.cfc
-----------
component accessors = true {
// accessors = true // syntax error here (it should be above,as per now)
property string username setter = true required=true;
property string password setter = true required=true;
property string WSURL setter=true required=true;
}
test.cfm
---------
this works
<cfset foo = new foo()>
<cfset foo.username = "user">
<cfset foo.password = "pass"><!--- typo here, was wsp.password = "pass" --->
<cfdump var="#foo#">
test2.cfm
---------
This doesn't work, but is suppsoed to according to the docs I found.
<cfset foo = new foo(username:"user",password:"pass")>
<cfdump var="#foo#">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment