You've gone and done it now, worm, can, open... ... does a CF query map to a built in Java dataype or is there a Query class?
Got any more exmaples? Got any code to help explore this new gold mine? The service factory was fun but this looks like it might be even better! (If anyone's reading this, I didn't just say that :OP) Ade -----Original Message----- From: Tim Blair [mailto:[EMAIL PROTECTED] Sent: 23 September 2004 16:27 To: [EMAIL PROTECTED] Subject: RE: [ cf-dev ] number of items in a list > Do you know to what extent this new functionality is supported? > > I'd hate to start using Java methods directly on CF variables > (I assume that's what you're doing) only to find that in some > future version the code fails to run because of some > modification MM make. Well, of course this behaviour is "under the hood" and unsupported stuff which you probably won't find in any offical CF docs, much in the same wasy as using the service factory methods. While we're on the subject, another good one I've found is the handy isLast() function that you can call on queries. Take, for example, you want to print a comma-delimited list of items in a particular query column (and before anyone says it, yes you can use valueList() -- this is just an exmaple!). You need to output a value, followed by a comma each time apart from the last value. In regular CF, you'd can either do your query, set up a counter, then loop through all the results, incrementing the counter and comparing it to myQuery.recordcount to see if you've got to the end. The slightly better way is to remove the counter and use myQuery.currentrow instead. Alternatively, you can ignore any comparison of values as in the previous two example, and simply do a boolean check on myQuery.isLast() which will return TRUE if the current row is the last. Hidden methods are great. :) It's up to you whether you choose to use these functions or not, which I guess in most cases will come down to if (when) CF7 comes out, it may break things, but are you likely to upgrade the machines you're hosting your already-written apps on? Tim. -- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED]