Created
April 7, 2014 23:20
-
-
Save deltaforce/10072758 to your computer and use it in GitHub Desktop.
railo implicit notation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
according to the following url | |
http://www.getrailo.org/index.cfm/whats-up/railo-40-released/features/implicit-constructors/ | |
<cfset foo = new foo(username:"user",password:"pass")> | |
should work, but doesn't seem to. | |
also the required attribute doesn't seem to work either, although this may be ACF only. | |
foo.cfc | |
----------- | |
COMPONENT { | |
accessors = true; | |
property string username setter = true required=true; | |
property string password setter = true required=true; | |
property string WSURL setter=true required=true; | |
public function init () { | |
return this; | |
} | |
} | |
test.cfm | |
--------- | |
this works | |
<cfset foo = new foo()> | |
<cfset foo.username = "user"> | |
<cfset 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