From 4dbcce80e3f4cc44131d90c7a90808dc15fb81cb Mon Sep 17 00:00:00 2001 From: Daniel Sellers Date: Tue, 12 Jul 2011 14:00:17 -0500 Subject: [PATCH 1/3] added myself to the readme.markdown file --- readme.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.markdown b/readme.markdown index c77264e..b7dc1ba 100644 --- a/readme.markdown +++ b/readme.markdown @@ -22,6 +22,8 @@ Daniel Short (@danshort on twitter) * [http://www.dansshorts.com](http://www.dan Craig Kaminsky (@craigkaminsky on twitter) * [http://craigkaminsky.me](http://craigkaminsky.me) +Daniel Sellers (@daniel_sellers on twitter) * [http://designfrontier.net](http://designfrontier.net) + ## Git Workflow for Contributors This project uses the excellent [Git Workflow series](http://www.silverwareconsulting.com/index.cfm/Git-Workflow) by [Bob Silverburg](https://github.com/bobsilverberg/) for contributions. From f0598e5ed1fd33ccbdf967e5f7706c830964cb3f Mon Sep 17 00:00:00 2001 From: Daniel Sellers Date: Tue, 12 Jul 2011 20:44:23 -0500 Subject: [PATCH 2/3] Changed the this scope to the local scope in the makeEggs() method in section 10. Also recased the name of the function to headless camel case for readability. --- cfml100mins.markdown | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cfml100mins.markdown b/cfml100mins.markdown index 9bc7773..2ac0611 100644 --- a/cfml100mins.markdown +++ b/cfml100mins.markdown @@ -909,21 +909,21 @@ ColdFusion did not have a way of referring to nothingness until version 9. ColdF If you have three eggs, eat three eggs, then you might think you have *nothing* , but in terms of eggs you have "0". Zero is something, it's a number, and it's *not nothing*. -A large percentage of the errors you encounter while writing CFML code will involve a variable not existing. You thought something was there, you tried to do something to it, and you can't do something to nothing so CFML creates an error. Lets rewrite our ```makeeggs``` method to illustrate "NULL" : +A large percentage of the errors you encounter while writing CFML code will involve a variable not existing. You thought something was there, you tried to do something to it, and you can't do something to nothing so CFML creates an error. Lets rewrite our ```makeEggs``` method to illustrate "NULL" : #### Tag ```cfm - + - + - - + + - - + + @@ -933,20 +933,20 @@ A large percentage of the errors you encounter while writing CFML code will invo #### Syntax ```cfm -public component function makeeggs (numeric quantity){ +public component function makeEggs (numeric quantity){ if (IsNull (arguments.quantity)) { - this.makeEggs = "How am I supposed to make nothingness number of + local.makeEggs = "How am I supposed to make nothingness number of eggs?"; } else { - this.makeEggs = "Making your #arguments.quantity# eggs!"; - this.yourEggs = ArrayNew (1); - while (ArrayLen (this.yourEggs) < arguments.quantity) - ArrayAppend (this.yourEggs, "Making an Egg."); + local.makeEggs = "Making your #arguments.quantity# eggs!"; + local.yourEggs = ArrayNew (1); + while (ArrayLen (local.yourEggs) < arguments.quantity) + ArrayAppend (local.yourEggs, "Making an Egg."); } - return this; + return local; } ``` -Reload the file, call ```frank.makeeggs(3)``` then try ```frank.makeeggs()```. +Reload the file, call ```frank.makeEggs(3)``` then try ```frank.makeEggs()```. **TODO: Conclusion** From 11c1d3b8fb8c6213e7c94c0c59715884c38cf650 Mon Sep 17 00:00:00 2001 From: Daniel Sellers Date: Tue, 12 Jul 2011 20:45:56 -0500 Subject: [PATCH 3/3] missed one instance of this that needed to be replaced by local --- cfml100mins.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfml100mins.markdown b/cfml100mins.markdown index 2ac0611..f8153e8 100644 --- a/cfml100mins.markdown +++ b/cfml100mins.markdown @@ -926,7 +926,7 @@ A large percentage of the errors you encounter while writing CFML code will invo - + ```