> 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.

--
-------------------------------------------------------
Badpen Tech - CF and web-tech: http://tech.badpen.com/
-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
------------------------------------------------------- 

--
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]

Reply via email to