- see footer for list info -<
In OOP, libraries are encapsulated in an object ,a cfc, too: a class that
has to access to a library has to instanziate it in its own constructor.
regards
salvatore
----- Original Message -----
From: "dominic watson" <[EMAIL PROTECTED]>
To: "Coldfusion Development" <[email protected]>
Sent: Monday, October 17, 2005 3:40 PM
Subject: Re: [CF-Dev] UDFs
>- see footer for list info -<
Well I've done this anyways, not sure it is good practice but it is
working for me:
Created a cfc called UDFLibrary.cfc.
Make all the udf's CFFunctions and put them in the cfc
In application.cfm create a session object of the UDFLibrary.
So now, to access a udf called myUDF, I use
session.udf.myUDF()
Can anyone see any problems with this?
dominic watson wrote:
- see footer for list info -<
Both cfcs and cfms
Kerry wrote:
- see footer for list info -<
access it anywhere
depends on what you mean by "anywhere"
do you mean in all your .cfm files? or in other cfc's as well?
creating a session object
sounds okay if its a very light object and/or you are sure you will
never
have a massive amount of sessions, but I would probably do something
along
the lines of:
application.cfm
if(not structkeyexists(application,"mycfc")){
application.mycfc = createobject(
}
request.common.mycfc = application.mycfc
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of dominic watson
Sent: 17 October 2005 14:06
To: Coldfusion Development
Subject: [CF-Dev] UDFs
- see footer for list info -<
I've kinda asked this before but I think I asked the wrong question:
Is there a way of registering a udf that means I could access it
anywhere without having to include the damn thing in every template it
is used?
I am thinking of putting it in a cfc and creating a session object of
the cfc, good idea?
Thanks, dom
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
__________ Informazione NOD32 1.1257 (20051016) __________
Questo messaggio รจ stato controllato dal Sistema Antivirus NOD32
http://www.nod32.it
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<