Grant
Member since Feb 10, 2010
- Profile: /members/5415-grant.htm
- Comments: 12
Recent Blog Comments By Grant
-
Cannot Invoke Method On An Object Of Type coldfusion.runtime.VariableScope With Named Arguments
Posted on Dec 30, 2010 at 6:05 AM
Just an additional bit of info for people still using CF7: 1. I was only able to resolve this issue by using Leon's method, above. 2. My methods were public. At least on CF7 it didn't matter if the method was public or private. 3. Calling templates could access APPLICATION scoped methods just f... read more »
-
Converting A ColdFusion Query To CSV Using QueryToCSV()
Posted on Dec 2, 2010 at 12:29 AM
@Ben, Actually, I meant the column escape character (triple quotes). Thought there was a comment about qualifier being faster to "just do". But I may have misunderstood the comment. Apologies about the wrong terminology. Loooong couple of days and hit enter too soon.... read more »
-
Converting A ColdFusion Query To CSV Using QueryToCSV()
Posted on Dec 1, 2010 at 9:45 AM
@Ben You could make an arg for the field delim, and set your preferred delim as the default. Then if someone wanted no delims they could pass delim="". Should be just as fast to do """ as #delim#, right?... read more »
-
Overloading Javascript Functions Using A Sub-Function Approach
Posted on Sep 10, 2010 at 8:52 AM
I've done this a couple times in cfscript, when I wanted a conditional argument. I've also done something similar in cfc methods when a function contains most of the logic I want already, but I want to interact with it in different ways. The advantage to cfc methods is that you can self document... read more »
-
OOPhoto - Simple Service Objects In Place
Posted on Mar 3, 2010 at 1:45 PM
@Ben, I sort of understand dependency injection [learding OOCF myself atm]. Reading through your examples I can see the benefit of injecting some variable into an object. But why make DSN an object, instead of a string? I took a look at the kinky file explorer and I can't find a DSN object anywh... read more »
-
Building Single-Page Applications Using jQuery And ColdFusion With Ben Nadel (Video Presentation)
Posted on Feb 24, 2010 at 11:36 PM
So Ben, Would you attempt a real application like this if you were a CF developer or would you hire a javascript developer so it didn't take your learning curve to build it for the client? I have built a couple first try apps in mootools, and I've done some similar quick and dirty functionality in... read more »
-
Ask Ben: Building An AJAX, jQuery, And ColdFusion Powered Application
Posted on Feb 17, 2010 at 11:47 AM
@Ben While we're on the subject of scopes and vars... I was just implementing some of this code in an application I'm building and I ran across this question: "When I write models [beans] or data objects, I've been using the THIS scope to keep my variables protected. Other snippets I've picked up... read more »
-
Ask Ben: Building An AJAX, jQuery, And ColdFusion Powered Application
Posted on Feb 17, 2010 at 11:19 AM
@Ben Yup, perfectly. Thanks.... read more »
-
Ask Ben: Building An AJAX, jQuery, And ColdFusion Powered Application
Posted on Feb 17, 2010 at 9:54 AM
Hey Ben, I feel like a jerk if I don't tell you every time I comment how great the site is and how helpful your posts are to me. So, thanks... AGAIN! :) Anyhow, I saw that you used curly braces in a CFSET above to define the LOCAL scope??? I said wtf is that and wrote my favorite test bel... read more »
-
Ask Ben: Displaying And Formatting The Difference Between Two Dates
Posted on Feb 11, 2010 at 8:10 AM
@Ben Nadel, Thanks. DateDiff() is one of those functions that I'm aware of, but how it really works is a bit foggy to me. I've used it before, but I don't use it much. This could be because it confuses me, or because I haven't needed it. I just checked adobe's documentation and they note someth... read more »
-
Ask Ben: Displaying And Formatting The Difference Between Two Dates
Posted on Feb 10, 2010 at 5:09 PM
/me smacks forehead got it wonky a bit in the code above... code should be: <cfset dtFrom = ParseDateTime(session.ignored) /> <cfset dtTo = ParseDateTime(now()) /> <cfset dtDiff = (dtTo - dtFrom) /> <cfset daysAgo = Fix(dtDiff) /> <cfset hoursAgo = TimeFormat( dtDiff, "H"... read more »
-
Ask Ben: Displaying And Formatting The Difference Between Two Dates
Posted on Feb 10, 2010 at 3:13 PM
Ug.... Ben, thanks man for this post. Date math messes with my head. I was even struggling after I read this because I was skipping steps. I actually had to write out each operation I was doing so I could figure out where I went wrong. [Now, in my defense I programmed for a solid 14 hours yest... read more »