Phillip Senn wrote:
But the resourceBundle.cfc written by Paul Hastings has got me confused.
w/input from ray. i guess it's been quite a while since anybody poked around
inside that thing.
First, the "init" function is called "loadResourceBundle", and its
returntype="void".
that's not really an init function. the "init" bits are the pseudo init bits at
the top of the file (and this is now "known" to be a bad practice).
Second, the getResourceBundle method has returntype="struct", and it's
last statement is:
<cfreturn resourceBundle>
Why doesn't he make the returntype components.resourceBundle and
<cfreturn this>
because that was all that CFC was meant to do, read an rb file into a struct &
return it to the blog. since it was added recently i can recall that the
messageFormat method (if that's in the version you have) was added at the
request of the asFusion folks for *their* blog & i don't want to support a
barnyard of different versions. i forget why the other methods were added.
i haven't bothered tuning this thing up as it's used in too many places so stuff
might break or at least will have to be redone in the calling app. also it's not
our "bread & butter" rb functionality--that's in javaRB & rbJava CFCs which
probably follow more "modern" CFC practices.
You are subscribed to cfcdev. To unsubscribe, please follow the instructions at
http://www.cfczone.org/listserv.cfm
CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]