<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>RSS feed for InstantSpot site think-lab.net</title><link>http://think.instantspot.com</link><language>en-us</language><copyright>This work is Copyright &#xA9; 2009 by think-lab.net</copyright><generator>RSSVille ColdFusion FeedMaker, version 1.0</generator><pubDate>Sat, 07 Nov 2009 13:24:04 GMT</pubDate><item><title>ColdFusion Config Settings</title><link>http://think.instantspot.com/blog/2008/05/27/ColdFusion-Config-Settings</link><description>&lt;p&gt;Here is the problem I needed to come up with a way to allow my client admins to set alias&apos;s for entry forms and report headers. So I started looking at localization and quickly found that, that was not a good Idea at all so then I started looking at using ini files since ColdFusion has functions for reading and setting config keys. I also found that I didn&apos;t like using the config file for this so I created a table to store the infromation. Then I decided to do some test to see if the was some benefit to using a DB verses the ini file low and behold there is.&lt;br /&gt; This code block took [58ms] &lt;em&gt;to run&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cftimer label=&amp;quot;iniSettings&amp;quot; type=&amp;quot;debug&amp;quot;&amp;gt;  &amp;lt;cfscript&amp;gt;   iniFile = expandPath(&apos;config_1234_12.ini.cfm&apos;);   clientStruct  ={    clientNameLabel = getProfileString(iniFile, &amp;quot;client&amp;quot;, &apos;clientNameLabel&apos;),    clientNameHasValidation = getProfileString(iniFile, &amp;quot;client&amp;quot;, &apos;clientNameHasValidation&apos;),    clientNameValidation = getProfileString(iniFile, &amp;quot;client&amp;quot;, &apos;clientNameValidation&apos;)   };  &amp;lt;/cfscript&amp;gt;  &amp;lt;cfoutput&amp;gt;   &amp;lt;label&amp;gt;#clientStruct[&apos;clientNameLabel&apos;]#&amp;lt;/label&amp;gt;   &amp;lt;input type=&amp;quot;input&amp;quot; name=&amp;quot;clientName&amp;quot;&amp;gt;   &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Click Me!&amp;quot; onclick=&amp;quot;validate()&amp;quot;&amp;gt;   &amp;lt;script&amp;gt;    function validate(){     &amp;lt;cfif IsBoolean(clientStruct[&amp;quot;clientNameHasValidation&amp;quot;]) AND clientStruct[&amp;quot;clientNameHasValidation&amp;quot;] is true&amp;gt;      #ReReplaceNoCase(clientStruct[&amp;quot;clientNameValidation&amp;quot;],&apos;~clientname~&apos;, clientStruct[&amp;quot;clientNameLabel&amp;quot;])#     &amp;lt;/cfif&amp;gt;    }   &amp;lt;/script&amp;gt;    &amp;lt;/cfoutput&amp;gt; &amp;lt;/cftimer&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This code block took [2ms] &lt;em&gt;to run&lt;/em&gt;&lt;br /&gt; &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cftimer label=&amp;quot;DBSettings&amp;quot; type=&amp;quot;debug&amp;quot;&amp;gt;  &amp;lt;cfscript&amp;gt;   args = {    cfSection = &amp;quot;client&amp;quot;   };      clientStruct=application.configSettingsService.queryToPropStruct(application.configSettingsService.getByAttributesQuery(argumentcollection=args));   if(StructKeyExists(clientStruct,&apos;&apos;)){      }  &amp;lt;/cfscript&amp;gt;  &amp;lt;cfoutput&amp;gt;   &amp;lt;label&amp;gt;#clientStruct[&apos;clientNameLabel&apos;]#&amp;lt;/label&amp;gt;   &amp;lt;input type=&amp;quot;input&amp;quot; name=&amp;quot;clientName&amp;quot;&amp;gt;   &amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Click Me!&amp;quot; onclick=&amp;quot;validate()&amp;quot;&amp;gt;   &amp;lt;script&amp;gt;    function validate(){     &amp;lt;cfif IsBoolean(clientStruct[&amp;quot;clientNameHasValidation&amp;quot;]) AND clientStruct[&amp;quot;clientNameHasValidation&amp;quot;] is true&amp;gt;      #ReReplaceNoCase(clientStruct[&amp;quot;clientNameValidation&amp;quot;],&apos;~clientname~&apos;, clientStruct[&amp;quot;clientNameLabel&amp;quot;])#     &amp;lt;/cfif&amp;gt;    }   &amp;lt;/script&amp;gt;    &amp;lt;/cfoutput&amp;gt; &amp;lt;/cftimer&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt; &lt;p&gt;I know 58ms doesn&apos;t seem like much but remeber in this example its only one field and I have pages the have 50 fields that a client might alias.&lt;/p&gt;</description><pubDate>Wed, 28 May 2008 01:02:00 GMT</pubDate><guid>http://think.instantspot.com/blog/2008/05/27/ColdFusion-Config-Settings</guid><category>code,design,ColdFusion,CFC</category></item><item><title>Handleing Results in Model-Glue </title><link>http://think.instantspot.com/blog/2008/03/10/Handleing-Results-in-ModelGlue-</link><description>&lt;p&gt;Ok I am not the world&amp;rsquo;s best blogger but I am going to give a shot.  So I am working on a &lt;a href=&quot;http://model-glue.com&quot;&gt;Model-Glue&lt;/a&gt; Application that I started about a year and a half ago.  And I am finally starting to reuse some of my functions.  For example I have a saveUserAddress function and a saveUserAccount function and in both of these function&amp;rsquo;s I add result named success if there wasn&amp;rsquo;t an error.  So here is the problem, we adding a new feature that allows a user to setup a new address and a new account on the same screen but in &lt;a href=&quot;http://model-glue.com&quot;&gt;Model-Glue&lt;/a&gt; if there is a result the next function will not be called. So to fix this problem I added an argument to the message in the modelglue.xml file like so.&lt;br /&gt; &lt;br /&gt; &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;message name=&amp;quot;SaveUserAddress&amp;quot;&amp;gt;     &amp;lt;argument name=&amp;quot;addResult&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt; &amp;lt;/message&amp;gt; &amp;lt;message name=&amp;quot;SaveUserAccount&amp;quot; /&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt; &lt;br /&gt; Then in the controller component I add some logic to account for this.&lt;br /&gt; &lt;br /&gt; &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;cfif arguments.event.ArgumentExists(&amp;quot;addResult&amp;quot;)&amp;gt;     &amp;lt;cfif arguments.event.getValue(&amp;quot;addResult&amp;quot;) EQ true&amp;gt;         &amp;lt;cfset arguments.event.addResult(&amp;quot;success&amp;quot;, true) /&amp;gt;     &amp;lt;/cfif&amp;gt; &amp;lt;/cfif&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt; &lt;p&gt;I know there some &lt;a href=&quot;http://www.mach-ii.com&quot;&gt;Mach-II&lt;/a&gt; guys  out there  so I would like to know how you handle this in &lt;a href=&quot;http://www.mach-ii.com&quot;&gt;Mach-II&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Tue, 11 Mar 2008 00:40:00 GMT</pubDate><guid>http://think.instantspot.com/blog/2008/03/10/Handleing-Results-in-ModelGlue-</guid><category>code,ColdFusion,CFC,model-glue</category></item><item><title>Quick CFC Gotcha</title><link>http://think.instantspot.com/blog/2008/03/03/Quick-CFC-Gotcha</link><description>&lt;p&gt;Lets say you have a bean for an employee and it has getFirstName and setFirstName and lets you forget to put parenthesis like this &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;input type=&amp;quot;Text&amp;quot; name=&amp;quot;firstname&amp;quot; id=&amp;quot;firstname&amp;quot; value=&amp;quot;&amp;lt;cfoutput&amp;gt;#employeeBean.getFirstname#&amp;lt;/cfoutput&amp;gt;&amp;quot; /&amp;gt; &lt;/pre&gt;&lt;/div&gt; at then end when calling getFirstName you might expect to get an error but you wont you will get this &lt;div class=&quot;code&quot; &gt;&lt;pre&gt;&amp;lt;input type=&amp;quot;Text&amp;quot; name=&amp;quot;firstname&amp;quot; id=&amp;quot;firstname&amp;quot; value=&amp;quot;cfemployee2ecfc490364409$funcGETFIRSTNAME@25a2fe&amp;quot; /&amp;gt;&lt;/pre&gt;&lt;/div&gt; I am not sure why so if anyone knows why please leave a comment.&lt;/p&gt;</description><pubDate>Mon, 03 Mar 2008 14:50:00 GMT</pubDate><guid>http://think.instantspot.com/blog/2008/03/03/Quick-CFC-Gotcha</guid><category>code,ColdFusion,CFC</category></item><item><title>I am moving over .</title><link>http://think.instantspot.com/blog/2008/02/29/I-am-moving-over-</link><description>&lt;p&gt;I am moving my over to instantspot.&lt;/p&gt;</description><pubDate>Fri, 29 Feb 2008 06:06:00 GMT</pubDate><guid>http://think.instantspot.com/blog/2008/02/29/I-am-moving-over-</guid><category>General</category></item></channel></rss>